Number systems
2.1.1 Binary number system
There are ten digits in the decimal numbering system. In the binary system, there are only two, 0 and 1. Each digit in a binary number is called a bit. Computers consist of millions of transistor switches that can be either on or off, or true or false, and as a consequence they employ the two available digits in binary number system to represent the states of these switches.
Bits can be arranged to provide a numerical code that can be used to convey information. A particularly popular code is the ASCII code used to represent decimal digits, alphabetic characters.
Decimal | Binary |
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |
10 | 1010 |
11 | 1011 |
12 |
Get Newnes Interfacing Companion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.