Nau mai, haere mai ki te whārangi "Binary"! This page will demystify the fundamental language that all digital devices use to store, process, and transmit information: binary code.
Define what "binary" is and explain why digital devices use it.
Understand the concept of a "bit" and its two states (0 and 1).
Convert small binary numbers (up to 8 bits) into decimal (base 10) numbers.
Explain how combinations of bits can represent numbers, text, images, and sound.
Recognize that digital devices represent data with binary digits (CTDT PO3).
To get the most out of learning about Binary, it's essential to have a clear understanding of:
Digital Devices: Do you know that devices process, store, and transmit information? (Link to Digital Devices page)
Input & Output: Are you familiar with how data goes into and out of devices? (Link to Input & Output page)
File Types: Do you know that different types of information (like text, images, music) are stored in specific formats? (Link to File Types page)
Quick Check: Imagine a simple light switch. It has two positions: ON or OFF. How could you use a series of these switches to store information, like a code or a number? This is the basic idea behind binary!
Binary is a number system that uses only two symbols or digits: 0 (zero) and 1 (one). These two digits are called bits (from "binary digit").
In contrast, the decimal system (base 10) that we use every day has ten digits (0-9). Computers, however, operate on electricity, which is naturally in one of two states:
On / Off
High Voltage / Low Voltage
Charged / Not Charged
Because of this, it's much easier for digital devices to represent information using just two states. Every piece of information a computer handles – whether it's text, an image, a sound, a video, or even the instructions in a Computer Program – is ultimately stored and processed as huge sequences of 0s and 1s.
Just like the position of a digit in a decimal number (ones, tens, hundreds, thousands place) gives it a different value, the position of a bit in a binary number gives it a different value based on powers of 2.
A single bit can represent two possible states (0 or 1).
Two bits can represent four possible states (00, 01, 10, 11).
Three bits can represent eight possible states (000, 001, 010, 011, 100, 101, 110, 111).
This pattern continues: for every bit you add, you double the number of possible values you can represent.
Each position in a binary number represents a value that is a power of 2. As you move from right to left, the value of each position doubles. For example, from right to left, the values are: 1 (which is 2 to the power of 0), 2 (2 to the power of 1), 4 (2 to the power of 2), 8 (2 to the power of 3), and so on.
Here's what the position values look like for 8 bits:
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1
To convert a binary number to decimal, you add up the values of the positions where there is a '1'.
Example: Let's convert the binary number 0101 to decimal:
Imagine each binary digit is aligned with its position value:
The rightmost '1' is in the 1 (2 to the power of 0) position.
The next '0' is in the 2 (2 to the power of 1) position.
The next '1' is in the 4 (2 to the power of 2) position.
The leftmost '0' is in the 8 (2 to the power of 3) position.
So, to convert 0101:
0 * 8 (from the leftmost 0)
+ 1 * 4 (from the next 1)
+ 0 * 2 (from the next 0)
+ 1 * 1 (from the rightmost 1)
This adds up to: 0 + 4 + 0 + 1 = 5.
The binary 0101 is decimal 5.
A group of 8 bits is called a byte. Computers often store and process data in bytes.
Representing Different Types of Data:
Numbers: Integers (whole numbers), decimals, and even very large numbers can all be represented in binary.
Text: Each letter, number, or symbol on your keyboard is assigned a unique binary code (e.g., using ASCII or Unicode standards). For example, in ASCII, the capital letter 'A' is represented by the binary code 01000001.
Images: Images are made up of tiny dots called pixels. Each pixel is given a binary code to represent its color. More bits per pixel allow for more colors (e.g., 24-bit color uses 24 bits per pixel to represent millions of colors).
Sound: Sound waves are converted into digital signals by sampling them many times per second. Each sample's amplitude (loudness) is given a binary code.
Video: Video is a sequence of images (frames) displayed quickly, combined with synchronized audio. Each frame and its audio are represented in binary.
Understanding binary is fundamental to understanding how digital devices store data and how all File Types are ultimately just collections of 0s and 1s. This also impacts concepts like Data Transmission, Computer Security, and Encryption, as these all operate on the underlying binary data.
Activity 1: Binary to Decimal Conversion
Task: Convert the following 4-bit binary numbers into their decimal (base 10) equivalents.
0011
1000
1111
0110
Activity: Show your working for at least two of the conversions (e.g., 1 * 4 + 0 * 2 + 1 * 1).
Why this activity helps: This helps you understand how binary digits (bits) are used to represent numbers, a core concept for CTDT PO3 and PO4 ("digital devices store data using just two states represented by binary digits").
Evidence: Create a Google Doc with your conversions and working.
Activity 2: Human Binary Counter
Task: This is an unplugged activity! Use your fingers to count in binary. Imagine each outstretched finger is a '1' and a bent finger is a '0'. Assign values (from right to left, if you line them up): thumb is 1, index finger is 2, middle is 4, ring is 8, pinky is 16.
Activity:
Practice counting from 0 to 31 (using one hand).
Show how you would represent the decimal number 13 using your fingers.
Show how you would represent the decimal number 25 using your fingers.
What is the largest number you can count to using 5 fingers in binary?
Why this activity helps: This physical activity reinforces the concept of bits and their positional values (CTDT PO3).
Evidence: Take a photo or draw a diagram of your hand showing 13 and 25 in binary. In a Google Doc, explain how you represented these numbers and state the highest number you can count to with 5 fingers.
Activity 3: Representing Colors in Binary
Task: Research online how colors are represented digitally, often using RGB (Red, Green, Blue) values (e.g., search "RGB color binary representation").
Activity:
Explain briefly what RGB means for color.
If each color (Red, Green, Blue) can have a value from 0 to 255, how many bits are needed to represent a single color component (e.g., Red)? (Hint: 2 to the power of X must be greater than or equal to 256).
How many total bits are needed to represent one pixel in a 24-bit color image?
Why this activity helps: This helps you understand how computers store more complex types of data (like colors) using binary digits (CTDT PO5).
Evidence: In a Google Doc, provide your explanations and calculations.
Check your understanding of Decomposition.
Multiple Choice: Which of the following best describes decomposition in computational thinking?
a) Finding mistakes in a computer program.
b) Breaking a problem into smaller, manageable parts.
c) Repeating a set of instructions many times.
d) Hiding secret messages inside other messages.
Short Answer: Why is decomposition important when you're trying to solve a big, complex problem? Name at least two reasons.
Scenario: Your task is to bake a cake from a recipe.
How would you apply decomposition to this task?
Provide two examples of smaller tasks you would get from decomposing "baking a cake."
Binary is a number system using only two digits: 0 and 1.
Each 0 or 1 is called a bit, and a group of 8 bits is a byte.
Digital devices use binary because their electronic components naturally have two states.
Information (numbers, text, images, sound, video) is represented in computers using combinations of bits.
Understanding binary is fundamental to how digital devices store, process, and transmit data, and impacts concepts like Error Control and Encryption.
Now that you understand the fundamental language of computers, you're ready to explore how this basic building block is used to move, store, and secure information:
Data Transmission: Discover how these 0s and 1s travel across networks and between devices.
File Types: See how different file formats are essentially different ways of organizing sequences of binary data.
Encryption: Learn how binary data is scrambled and unscrambled to keep it secret.
Computer Security: Understand how security measures protect the fundamental binary data.
Continue your journey by clicking on the links to these exciting topics!