Ignore:
Timestamp:
Sep 13, 2010, 11:04:55 AM (11 years ago)
Author:
mulligan
Message:

More work on bits, bytes, nibbles, and added modules for byte7s and
words.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D4.1/Byte.ml

    r62 r63  
    11(*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*)
    2 (* FILENAME: Byte.ml                                                         *)
    3 (* DESCRIPTION: An ADT implementing bytes, and common operations on them.    *)
    4 (* CREATED: 10/09/2010, Dominic Mulligan                                     *)
     2(* FILENAME:    Byte.ml                                                      *)
     3(* DESCRIPTION: An ADT implementing standard 8 bit bytes, and common         *)
     4(*              operations on them.                                          *)
     5(* CREATED:     10/09/2010, Dominic Mulligan                                 *)
    56(* BUGS:                                                                     *)
    67(*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*^*)
     
    1617(*
    1718  val from_bits: bit -> bit -> bit -> bit -> bit -> bit -> bit -> bit -> byte
     19  val from_bit: bit -> byte
    1820  val from_nibbles: nibble -> nibble -> byte
     21  val from_nibble: nibble -> byte
    1922  val from_int: int -> byte
     23
     24  val to_bit: byte -> bit option
     25  val to_nibble: byte -> nibble option
     26  val to_int: byte -> int
    2027
    2128  val get_nibble_at: int -> byte -> nibble
     
    4552  type nibble = Nibble.nibble
    4653  type byte = nibble * nibble
     54
     55  let from_bits b1 b2 b3 b4 b5 b6 b7 b8 =
     56    let nibble
    4757end
Note: See TracChangeset for help on using the changeset viewer.