Lesson 1: What is a Computer
What's a Computer?
A computer is an electronic device that processes information. It can store, retrieve, and manipulate data.
Computer architecture
A computer consists of four major parts:
- input
- output
- CPU (central processing unit)
- memory
A computer takes input, stores that information somewhere, processes it, and then outputs the result.
Input: Anything that you tell a computer to do using an input device such as a microphone, mouse, keyboard, camera, or smart watch.
Memory:All these different inputs give information to the computer, which is then stored in memory.
Processor: The computer processor takes this information from memory, works on it using different algorithms (series of operations), and then sends the processed result back to be stored in memory again. This continues until all of the data is ready to be sent to output.
Output:A computer sends output such as text, photos, videos, games, or VR to output devices such as a screen, printer, or speakers.
Binary data
Now let’s learn how a computer turns electrical signals into binary data.
Computers use the binary digits, 0 and 1, to store data. The smallest piece of information that can be processed is called a “bit”.
A bit can be imagined as an electric switch, which has a value of either ON or OFF. The circuit in a computer’s processor is made up of billions of transistors. It is a tiny switch that is activated by the electronic signal that it receives.
You might ask, “How much electricity is required for a transistor to turn on?”
It depends on type of transistor and its threshold. At any particular threshold voltage (5V) or higher, the transistor turns itself on; otherwise it stays off.
Number systems
Let us now explore more on different types of number systems we use.
In mathematics, a ‘base’ or ‘radix’ is the number of different digits used to represent a number.
- Base10 (decimal) is represented using numerical characters 0-9.
- Base2 (binary) is represented using numerical characters 0-1.
- Base16 (hexadecimal) is represented using alphanumerical characters 0-9, A, B, C, D, E, and F. A single hexadecimal digit is represented by four binary digits.
The following table lists the binary and hexadecimal equivalents for the decimal numbers 0 to 16.
It is quite straightforward to convert between binary, decimal, and hexadecimal formats.
Converting 10111000 into hexadecimal:
Hexadecimal is represented by four binary digits, so first we need to group our binary number into bits of 4: 1011 1000
The answer is B8.
Try it!
Convert B8
ASCII binary code
American Standard Code for Information Interchange (ASCII) uses eight bits to represent a single character on your computer screen. The following table lists the characters a to z and their binary equivalents.
Try it!
Can you write your name in ASCII binary code? How many total bits are required to write your name?