3. Number Systems, Base-N Arithmetic & 2's Complement Subtraction

What you will be able to do. By the end of this chapter you will be able to read a number written in any base, convert between decimal, binary and hexadecimal, and add and subtract directly in a base other than ten. You will write negative numbers in a form called 2's complement, and you will see why a chip needs no separate circuit for subtraction: its adder can do the job.

From yes or no to how many

So far every wire has answered a yes-or-no question. Is the gate open? Did the majority vote yes? But a chip also counts, measures and calculates, and for that its wires must be able to say how many.

The first chapter left a promise about this: 1 and 0 are digits, so several of them side by side can be read as a number. You have in fact been doing it already. The rows of a three-input truth table, 000, 001, 010 and so on up to 111, are the numbers 0 to 7 written with the digits 0 and 1. Every time you filled in a truth table you were counting.

🔒 Log in or create a free account to read the rest of this chapter

This course is free. An account also lets you run the simulations, try the circuits and keep your place.

Create a free account Log in Back to the course