X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Adders.hs;h=4b18e393504e7844be495b748a4c3143180e9f24;hb=8a17f35807fb35ee4d2a4c35c75e1cf99066f94d;hp=ebc1c8c4f0ee45aa6a3975bbeb46d99fe0c04fd3;hpb=ff9a8487475aa90d2f212fd24169503993a4a27d;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Adders.hs b/Adders.hs index ebc1c8c..4b18e39 100644 --- a/Adders.hs +++ b/Adders.hs @@ -174,6 +174,16 @@ instance Inv (BitVec D0) where functiontest :: TFVec D4 Bit -> Bit functiontest = \v -> let r = head v in r +highordtest2 = \a b -> + case a of + High -> \c d -> d + Low -> let + op' :: Bit -> Bit -> Bit + op' = case b of + High -> \c d -> d + Low -> \c d -> c + in + \c d -> op' d c -- Four bit adder, using the continous adder below -- [a] -> [b] -> ([s], cout) --con_adder_4 as bs =