Have you ever wondered how computers and smartphones are able to store so much information? The digital information we see as text and images, as well as the music and digitized speech we hear, is actually made up of billions of 1s and 0s known as the binary number system.
Every piece of information transmitted over the Internet, whether by wi-fi signals, fiber optics, or over actual copper cables, is sent as binary data that our devices convert into content that we can understand as text and images.
The binary or base two (2) mathematical system represents values as a series of ones (1s) and zeros (0s). In binary, the number following 1 is 10. But in this case, the digits 10 represent the value two, not the value ten. Here are the values 0 through 8 represented as both binary numbers and their decimal equivalents:
Binary: 0, 1, 10, 11, 100, 101, 110, 111, 1000.
Decimal: 0, 1, 2, 3, 4, 5, 6, 7, 8.
Binary numbers are usually written in groups of 4 or 8 digits. When the value being represented uses fewer digits, any unused positions are filled with zeros to maintain uniformity. These leading 0s don’t change the value of the number as they are merely placeholders. For instance, the binary number 11 (which is 3 in decimal) would be written 0011.
An individual zero (0) or one (1) is referred to as a bit. As you might imagine, binary numbers can become very long very quickly. Writing them in 4- or 8-bit groups makes them a bit (pun intended) easier to read for us humans. We use commas in much the same way to make large decimal numbers easier to read.
For example, writing twelve million as 12,000,000 is more easily recognizable than writing 12000000. Similarly, twelve million in binary can be written as 101101110001101100000000. To make this more readable, a dash or space can be placed between every four binary digits, 1011-0111-0001-1011-0000-0000.
A bit represents one of two possible states: true or false, on or off, etc. Groups of bits are used inside computers to store large amounts of information and complex data types. The most common grouping is to take eight (8) bits and reference them as a single unit. A group of eight bits is technically called an octet, however, in computer mathematics it’s called a byte. A byte is the smallest number of bits that can be accessed in a computer system.
The term character, as used to denote 8 bits, comes from the fact that computers store alphanumeric characters, such as letters and numbers, one to a byte.
At this point, you might be wondering, “Why would I need to know this?”
First of all, it’s pretty cool knowing what a computer is actually doing under the hood. Second, becoming “tech savvy” can save you money when buying data. Data speed is measured in bytes per second: Million/Mega – Mbps, Billion/Giga – Gbps. Having an understanding of bits and bytes will not only improve your computing skills, it may even boost your confidence when it comes to mastering the computing experience.
We are living in an age of rapid technological advancement with AI, Blockchain, and Web3 application development on the rise. Having a working knowledge of what goes on inside computers will help us stay competitive for when we get out. This includes understanding the basics of the binary number system.
Another method of representing binary numbers is using the powers of 2, known as exponentiation. In mathematical notation, the powers of 2 can be written: 2**0, 2**1, 2**3, etc.
Whenever there’s a binary number consisting of a 1 followed by all zeros, that number represents a power of two. The power is the same as the number of zeros in the binary number. For example, 1000 is the same as 2 raised to the 3rd power, or 8 in decimal.
Binary numbers can become astronomically large, allowing computers to process vast amounts of data. Byte by byte, these numbers are processed into the information we see and interact with on our smartphones, desktops, and tablets.
There is another mathematical numbering system commonly used in computing called hexadecimal, or base 16. This number system is more complex than binary, but far more efficient at representing numbers that are too large to represent in decimal. It’s also more convenient to use than binary when representing digital information. We’ll cover hexadecimal in a future edition of Tech Block 42.