Introduction
There is so much about 0 and 1’s in our lives with technology all around us! Wait a minute, what is zero and ones got to do with technology? And what do you mean by base? Well, the short answer is we count in base 10 or decimal system. And the digital devices operate on the binary system, base 2.
Ok, but why base 2? It all goes back to switches and they can only be in either of one position – on or off. From this concept, we get micro-chips which have small switches which can be in on or off position. This is how our programs communicate to machines. When the switch is in off position we represent it as 0 and if it is on then 1.
In this updated article (originally written and posted in circa 2005), we will see how to have fun with zeros and ones and counting different bases other than the decimal base. We will also see the reason I give donations which are powers of 2.
Bases
When we are asked to count we normally count start from 1 and then 2, 3, 4, 5, 6, 7, 8, 9, 10; which is natural. These numbers as shown below are called Natural Number Set. So called as it comes from counting our fingers. Now, we can also start counting from 0 and it goes as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 . We still get 10 digits and these are called Whole Number Set. By adding 0(zero) to the Natural number set we get Whole number set.
However, let us focus on the second way of counting i.e. using the Whole Number Set :
Units | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Tens | 10+0=10 | 10+1=11 | 10+2=12 | 10+3=13 | 10+4=14 | 10+5=15 | 10+6=16 | 10+7=17 | 10+8=8 | 10+9=19 |
Twenties | 20+0x1=20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
The decimal system (base 10) is very popular as majority of humans have two hands with five digits on each hand. There are other bases we use in our daily lives like the clock which is 60 seconds make a 1 minute and 60 minutes to 1 hour is counting to base 60. And our calendar has 12 months to a year (base 12) while every week has 7 days (base 7) and so on.
Now in a calendar we have 12 months make one year. So the base for the year to change is after it hits a multiple of 12. This is shown below as we saw above for decimal system.
Units | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
Tens | 12+0=12 | 12+1=13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 12+10=22 | 12+11=23 |
Twenties | 24=24+0 | 24+1=25 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 24+10=34 | 24+11=35 |
As you can see we count using different bases without thinking about it or questioning about it. Of course, we can take something smaller than our decimal system base 10, say 8 and the table will look as below:
Units | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Tens | 8+0=8 | 8+1=9 | 10 | 11 | 12 | 13 | 14 | 15 |
Twenties | 16+0=16 | 16+1=17 | 18 | 19 | 20 | 21 | 22 | 23 |
Bits
What are bits?
Binary digITS (BITS) is counting in base 2; but why would anyone be interested in that. Machines have can be in only two states i.e. ON or OFF. When the machine (or switch in the circuit) is off it is said to be 0 and when it is on then it said to be 1. However, this works very well with machines software programs are converted into bits which tells the machine to process the commands in the program. In fact, all of your documents, your information is stored on the hard drive of your computer in binary. Each character on your key board is represented in a binary notation on the machine. Machines only understand binary digits as they are basically looking at off or on position.
In this base 2, the counting as was done in the Bases section is shown:
Units | 0 | 1 |
Tens | 2+0=2 | 2+1=3 |
Twenties | 4+0=4 | 4+1=5 |
Thirties | 6+0=6 | 6+1=7 |
Hey, this is all good and kind of getting dense. Is it possible to represent a decimal number in one of the other bases? How? Yes, and we shall take the decimal number 783 and represent below.
The number 783 in the decimal system actually is written below:
Digit | Powers of 10 | Total | ||
Hundreds | 7 | x | 102 | =700 |
Tens | 8 | x | 101 | = 80 |
Zero-th | 3 | x | 100 | = 3 |
78310 | Total | = 78310 |
In the decimal system, we are counting how many 10s, 100s, 1000s, 10000s etc. there are. Then we are multiplying the number depending on where it is positioned, and finally, we add them up.
If we were to do the same to the 8th base, then the above table will look as follows:
Digit | Powers of 8 | Value | ||
Thousands | 1 | x | 83 | =512 |
Hundreds | 4 | x | 82 | =216 |
Tens | 6 | x | 81 | =48 |
Zeroth | 7 | x | 80 | =7 |
14678 | Total | = 78310 |
Now the number 78310 ~= 14678. This means that any number (like 783) can be written to any number base; even its own.
So in computers we are interested in binary digits, as the switches in circuits are either ON or OFF. With this in mind, the number above (783) would be written in binary form as follows:
1 | x | 29 | =512 | |
1 | x | 28 | =256 | |
0 | x | 27 | =0 | |
0 | x | 26 | =0 | |
0 | x | 25 | =0 | |
0 | x | 24 | =0 | |
1 | x | 23 | =8 | |
1 | x | 22 | =4 | |
1 | x | 21 | =2 | |
1 | x | 20 | =1 | |
11000011112 | Total | = 78310 |
This means that:
11000011112 ~=78310
So let us say you give your kids a check or cash for $32 which in binary is $100,0002 means you gave your kid an allowance of 100K in binary.
Summary
Bits are binary digits. Any decimal number can be converted into binary number or to any other positive integer base. The byte is a unit of digital information that most commonly consists of eight bits, representing a binary number.
Further Reading
- The history of zero is covered in a book by Amir Aczel titled “Finding Zero: A Mathematician’s Odyssey to Uncover the Origins of Numbers”.
3 thoughts on “About 0 & 1 – bit of a byte!”
Well written, though some of it went over my head. I like the summary at the end and the cartoon joke. 👏
Very well written and informative article! I learned a a lot from it!
Thank you Prena, for your patronage