What Makes Computers Tick?
When you think of computing, you may have images of whizzing processors or geeks typing on screens. But did you ever wonder how all these devices work? If so, keep reading.
As technology continues to advance and computer literacy becomes more important than ever, we are going to break down what makes computers tick!
Electricity is the Common Demonator
You flick a switch and a light bulb turns on. You flick the switch again and the blub turns off. If I were to tell you that computers run on this simple principle, would you believe me? Well, believe you should because that’s all there is. Simply refer to a bulb that is lit as the number ‘1’ and when it is off, refer to it as a ‘0’.
In other words, the values ‘0’ and ‘1’ are based on whether electricity, more popularly referred to as current, is flowing and is represented by ‘1’ or current is not flowing, represented by ‘0’.
So Should I Call Them Ones and Zeros?
Not exactly. These two values are known as bits. So whatever you are doing on the computer; such as reading this article, you are actually reading a long list of bits that the computer sees and then it translates those bites into words.
Of course, it is a bit (pun intended) more detailed than that. Not complex though, just a little more to absorb. Starting with the fact that when I mentioned “reading a long list of bits”, we have to translate these “long lists” into an organized pattern that the computer can understand; in other words, how to translate them into something we humans will understand.
If you align eight bits in a row where some are set to ‘1’ and others are set to ‘0’, you have created what is referred to as a byte.
It’s an arrangement that has a particular meaning to the computer.
A byte can be any letter or number from A-Z, 0-9 respectively. It can also store special characters, For example, binary code 00001101 is equal to 13 in decimal form. The alphabetic character “M” is similar in bit arrangement, but with one bit (pun intended again) of a difference, and that is it has an extra ‘on’ bit – 01001100.
If you were to type the letter ‘R” on your screen, it would involve a different combination of eight bits. In this case, for the letter ‘R, the sequence would be 01000010, and the letter ‘S’ would be 01000011, and so on.
Let’s backtrack and look at how these bits equate to their electrical equivalent. For our ‘M’ example above, which has the bit arrangement of 01001100, that would equal the following combination of electrical current that is, in this exact sequence: off, on, off, off, on, on, off, off.
It is based on a table called ASCII (As Key), which displays the eight bits (bytes), in ascending sequence, where each byte equates to a letter or number.
The particular instruction would depend upon the arrangement of the 1s and 0s. If you think this seems like some type of code, it is and is called binary code.
Bites and Bytes Review
- A bit is a switch that is either electronically on or off.
- A byte is a combination of eight bits.
- Each pattern of bits in the bytes represents a number, letter or special character.
Understanding how computers use bits and bytes can help you understand how they process everything from the simplest math problems to streaming video or playing games online. Keep reading to learn more about this topic!
Why are Bits Important?
Bytes determine whether a file is an image, document, spreadsheet, movie, audio file or other medium and they tell your computer what to do with the information in that file.
Converting information into digital form is called encoding; the process of converting it back into its original state is called decoding. Encoding and decoding both involve assigning values to different pieces of information so that a computer can store and process it appropriately.
For example, let’s say you have a picture that you want to save on your computer. The picture will be broken down into individual pixels and assigned an identifying number. This number will represent the color of each pixel (e.g., red, blue, or green). Thus, encoding this picture involves assigning numbers to each piece of information in it—in this case, the colors of each pixel in the photo.
Decoding would work the same way it would give a pixel its original identifying number so that it could once again be identified as a specific color; thus allowing you to see the photo as intended by its creator!
Bits in Programming
When you’re programming a computer, you use bytes to represent information. For example, when the programmer asks the computer to calculate 5+5, it translates this into binary. “0001 0010 0101” So in binary, 5+5 is “0110 0100 0101” (This is called a binary addition). These two numbers are added together and the answer of 10 is sent back. And that’s how bits work!
Writing the Computer Program
Computer programs read what’s called instructions. It tells the computer to do things, as explained in the following examples.
- Print Something
When you tell your computer to print a document, there are instructions that tell it to do just that.
Scan the document or picture.
Contact the printer.
Send the document or picture to the printer.
Tell the printer to print it.
- An ATM Example
In banking, a set of computer instructions tells the system to read a customer’s checking balance when he/she is at an ATM. If the individual attempts to withdraw funds that are more than what’s in the checking balance, the person would be told there is not enough money in the account for this withdrawal.
- Here are computer program instructions written in Python that determines if a variable input of a stock price is higher than 50 and display a corresponding message:
# Get the stock price from the user
stock_price = float(input(“Enter the stock price: “))# Check if the stock price is higher than 50
if stock_price > 50:
print(“Your stock is growing!”)
print(“Your stock is not growing.”)
In this example, the program prompts the user to enter the stock price, which is stored in the variable
The program then uses an
ifstatement to check if the stock price is higher than 50. If it is, it displays the message “Your stock is growing!” using the
- Print Something
This is called an if/then condition and is extremely common in computer programming. Also called a logical statement.
The same situation will occur over and over and the same result will happen. There is no determination that there may be more issues occurring, such as possible fraudulent activity and that is where artificial intelligence comes in as we discuss in our AI 101 article.
A computer bit is the smallest unit of information that a computer can read. When you align eight bits in a row, it is called a byte and each byte represents a letter, number, or special character, which is defined by the arrangement of the bits in the byte.
The translation of each byte can be found in the ASCII table. Bits are used to process everything from the simplest math problems to streaming video or playing games online.