Computer Science
Grade 7
20 min
2. Converting Between Binary and Decimal
Learn how to convert numbers between binary and decimal representations.
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Define the binary and decimal number systems.
Explain the concept of place value in both binary (base-2) and decimal (base-10).
Convert an 8-bit binary number to its decimal equivalent.
Convert a decimal number (up to 255) to its binary equivalent.
Identify the value of each bit in an 8-bit binary number (1, 2, 4, 8, 16, 32, 64, 128).
Explain why computers use the binary system for data representation.
How can a computer understand your favorite game, video, and homework using only two numbers, 0 and 1? 🤔
In this lesson, we'll unlock the secret language of computers! You will learn about binary (the computer's language) and decimal (our everyday number system) and master how to translate between them. This is a fundamental skill for understand...
2
Key Concepts & Vocabulary
TermDefinitionExample
Decimal (Base-10)The number system we use every day. It uses ten unique digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).The number 152 is a decimal number.
Binary (Base-2)The number system computers use. It only uses two unique digits: 0 and 1.The number 1011 is a binary number.
BitShort for 'Binary Digit'. It is the smallest unit of data in a computer and can be either a 0 (off) or a 1 (on).In the binary number 1011, each digit (1, 0, 1, 1) is a bit.
ByteA group of 8 bits. A byte is often used to represent a single character, like the letter 'A'.01000001 is one byte that represents the letter 'A'.
Place ValueThe value a digit has based on its position in a number. In decimal, place values are powers of 10 (1s, 10s, 100s). In binary, they are powe...
3
Core Syntax & Patterns
Binary to Decimal Conversion
Sum of (Digit × Place Value)
To convert a binary number to decimal, you multiply each binary digit by its corresponding place value (a power of 2) and then add all the results together. Place values start from 2^0 on the right.
Decimal to Binary Conversion
Repeated Division by 2
To convert a decimal number to binary, you repeatedly divide the decimal number by 2. The remainders from each division, read from bottom to top, form the binary number.
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Challenging
Consider the 8-bit binary number 10011001. If you flip the value of every bit (change every 1 to a 0 and every 0 to a 1), what is the new decimal number?
A.153
B.103
C.152
D.102
Challenging
What is the largest decimal number that can be represented using an 8-bit binary number?
A.128
B.256
C.512
D.255
Challenging
The letter 'B' is represented in binary as 01000010. The letter 'D' is two letters after 'B'. What is the decimal value of the letter 'D'?
A.67
B.68
C.66
D.69
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free