top of page

We're making a 64bit adder

The B4 Computer Processor Kit and the B4 Primary School Starter Kit come with a 4-bit adder module. This allows us to add numbers as long as the sum is not larger than 15. But what if we want to add larger numbers, such as one billion, or a trillion?

For this, we can daisy-chain multiple adder modules and connect the carry-out bit of one adder with the carry-in of the next adder. With this in mind, we have tried an experiment in class and connected 16 adders! And since 16x4=64, we have built a 64-bit adder, just like the adder in a modern microprocessor.

16 adders is a whole class set, but this works as well with just two adders to get started. But with our 16 adders, we can most definitely add 1 billion plus 1 trillion.

The numbers are set with manual programmers, which we have connected to the adder modules. The top row of manual programmers represents the first number and the bottom row the second number.

We have converted decimal to binary here and set the manual programmers accordingly.

1 billion is 111011100110101100101000000000 in binary

1 trillion is 1110100011010100101001010001000000000000 in binary.

The result is 10010001100010001010000011010110101000000000

This is a 'small' 44-bit number. We haven't even used the full 64 bits :-)

So, what's the learning here? Adding small numbers or big numbers is conceptually the same thing for a computer. Once you manage to add 2 bits and manage the carryover, you can add arbitrarily large numbers.

Anyone for 128bit?

Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page