Issue with 8-bit adder

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with 8-bit adder

kingpinzs
I made my 8-bit adder from two 4-bit adders
the thing is that if I add the following I get the shown results

7+10 = 17  0111
               1010
             10001

8+10 = 2   1000
9+10 = 3   1001
10+10 = 4 1010
11+10 = 5 1011
12+10 = 6 1100
13+10 = 7 1101
14+10=24  1110
Reply | Threaded
Open this post in threaded view
|

Re: Issue with 8-bit adder

cadet1620
Administrator
I can't tell anything from what you posted.

You can make your Add16 directly from a HalfAdder and 15 FullAdders.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Issue with 8-bit adder

kingpinzs
this is what I have

CHIP Add4 {
    IN a[4], b[4],c;
    OUT out[4],carry,OvF;

    PARTS:
        HalfAdder(a=a[0],b=b[0], sum=out[0], carry=c1);
               
        FullAdder(a=a[1],b=b[1],c=c1,sum=out[1],carry=outa3);
       
        FullAdder(a=a[2],b=b[2],c=c1,sum=out[2],carry=outa4);
       
        FullAdder(a=a[3],b=b[3],c=outa4,sum=out[3],carry=outa5);
Reply | Threaded
Open this post in threaded view
|

Re: Issue with 8-bit adder

cadet1620
Administrator
Check line 3.

But why make Add4? It's extra work.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Issue with 8-bit adder

kingpinzs
In reply to this post by kingpinzs
Never mind I did a stupid mistake ya I fixed it thanks.

i want to make a real hardware cpu but I know I cant make a big one so I am working on small ones
Reply | Threaded
Open this post in threaded view
|

Re: Issue with 8-bit adder

cadet1620
Administrator
You might want to check out Logisim. It's a schematic based logic simulator that will do you better for developing your own computers.

For real hardware, consider building with 74LS00 series TTL or 4000 series CMOS ICs. There's a fair amount of it available, retail and surplus.  74LS83, for instance, is a 4-bit adder in a 14-pin IC.

--Mark