]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/contribs/ng_assembly/num/exadecim.ma
freescale porting
[helm.git] / helm / software / matita / contribs / ng_assembly / num / exadecim.ma
index 07c19464a70071a8c912395723796e702bd6be8f..9400d90741ef7b6130c109f048a68331b349f109 100755 (executable)
@@ -688,6 +688,13 @@ ndefinition setMSB_ex ≝
  | x8 ⇒ x8 | x9 ⇒ x9 | xA ⇒ xA | xB ⇒ xB
  | xC ⇒ xC | xD ⇒ xD | xE ⇒ xE | xF ⇒ xF ].
 
+ndefinition clrMSB_ex ≝
+λe:exadecim.match e with
+ [ x0 ⇒ x0 | x1 ⇒ x1 | x2 ⇒ x2 | x3 ⇒ x3
+ | x4 ⇒ x4 | x5 ⇒ x5 | x6 ⇒ x6 | x7 ⇒ x7
+ | x8 ⇒ x0 | x9 ⇒ x1 | xA ⇒ x2 | xB ⇒ x3
+ | xC ⇒ x4 | xD ⇒ x5 | xE ⇒ x6 | xF ⇒ x7 ].
+
 (* operatore Least Significant Bit *)
 ndefinition getLSB_ex ≝
 λe:exadecim.match e with
@@ -703,6 +710,13 @@ ndefinition setLSB_ex ≝
  | x8 ⇒ x9 | x9 ⇒ x9 | xA ⇒ xB | xB ⇒ xB
  | xC ⇒ xD | xD ⇒ xD | xE ⇒ xF | xF ⇒ xF ].
 
+ndefinition clrLSB_ex ≝
+λe:exadecim.match e with
+ [ x0 ⇒ x0 | x1 ⇒ x0 | x2 ⇒ x2 | x3 ⇒ x2
+ | x4 ⇒ x4 | x5 ⇒ x4 | x6 ⇒ x6 | x7 ⇒ x6
+ | x8 ⇒ x8 | x9 ⇒ x8 | xA ⇒ xA | xB ⇒ xA
+ | xC ⇒ xC | xD ⇒ xC | xE ⇒ xE | xF ⇒ xE ].
+
 (* operatore rotazione destra con carry *)
 ndefinition rcr_ex ≝
 λc:bool.λe:exadecim.match c with