X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=Adders.hs;h=748c06fdb73e50158297e887b07939cb57d3865e;hb=c9b67e6b9c131a3e73bee4cdb4c4d37479e7bf36;hp=f29927ceac3fd6e0804ade47ca5974ccae5ae333;hpb=9167228f9fafba958723fa5a450b5966027127df;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git diff --git a/Adders.hs b/Adders.hs index f29927c..748c06f 100644 --- a/Adders.hs +++ b/Adders.hs @@ -10,6 +10,10 @@ show_add f = do print ("Sum: " ++ (displaysigs s)); print ("Carry: " ++ (displ b = [Low, Low, Low, High] (s, c) = f (a, b) +-- Not really an adder, but this is nice minimal hardware description +wire :: Bit -> Bit +wire a = a + -- Combinatoric stateless no-carry adder -- A -> B -> S no_carry_adder :: (Bit, Bit) -> Bit