Changeset 161 for Deliverables/D4.1/Physical.ml
 Timestamp:
 Oct 7, 2010, 10:35:46 AM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Deliverables/D4.1/Physical.ml
r144 r161 50 50 ;; 51 51 52 let add16_with_c (b1 : [`Sixteen] vect) (b2 : [`Sixteen] vect) (c : bit) = 53 let n1 = int_of_vect b1 in 54 let n2 = int_of_vect b2 in 55 let c = int_of_bit c in 56 let res = n1 + n2 + c in 57 let ac = n1 mod 256 + n2 mod 256 + c >= 256 in 58 let c6 = n1 mod 2097152 + n2 mod 2097152 + c >= 2097152 in 59 let res,c = res mod 4194304, res >= 4194304 in 60 let ov = c <> c6 in 61 vect_of_int res `Sixteen,c,ac,ov 62 ;; 63 52 64 let subb8_with_c (b1 : [`Eight] vect) (b2 : [`Eight] vect) (c : bit) = 53 65 let n1 = int_of_vect b1 in
Note: See TracChangeset
for help on using the changeset viewer.