Binary
Binary is a number system that only uses two digits, \(0\) and \(1\).
It was invented by German mathematician Gottfried Wilhelm Leibniz.
Binary code is used widely in computer programming, so it is important to learn what it means and how to use it.
Denary
The decimal number system, which we use everyday, is called denary.
In this system, there are hundreds, tens and units etc.
The denary system is based around the number \(10\) and uses the digits from \(0\) to \(9\).
The number six thousand three hundred and ninety two written in digits is \(6392\).
Thousands | Hundreds | Tens | Units |
---|---|---|---|
6 | 3 | 9 | 2 |
\(6392 = 6000 + 300 + 90 + 2\)
Key points
The denary system is based around the number \(10\) using the digits from \(0\) to \(9\).
The binary system is based around the number \(2\) using the digits \(0\) and \(1\).
So, instead of using units, tens, hundreds, and thousands, in the binary system we use units, twos, fours, eights etc.
Converting from a binary number to a denary (decimal) number
The binary number \(1001\) can be calculated in denary.
To do this put the number into the table.
\(1\) in the \(8\) column means there is an \(8\)
\(0\) in the \(4\) column means there are no \(4\)s
\(0\) in the \(2\) column means there are no \(2\)s
\(1\) in the \(1\) column means there is a \(1\)
Or simply add up the values at the top of the columns which contain a \(1\).
\(8 + 1 = 9\)
The table can be extended by multiplying by \(2\).
To change from binary into denary follow the steps:
- Extend the table to give the same number of columns as you have digits
- Place the binary number on the table
- Add the numbers in the binary place value row that have a 1 in the binary row
Example
What would the binary number \(10011010\) be in denary?
- Extend the table to give the same number of columns as you have digits.
In this example we need \(8\) places because there are \(8\) digits in the binary number.
- Place the binary number on the table.
- Add the numbers in the binary place value row that have a \(1\) in the binary row.
\(128 + 16 + 8 + 2 = 154\)
Question
What would the binary number \(111001\) be as a denary (decimal) number?
Answer
- Extend the table to give the same number of columns as you have digits.
For this question we need \(6\) places. - Place the binary number on the table.
- Add the numbers in the binary place value row that have a \(1\) in the binary row.
\(32 + 16 + 8 + 1 = 57\)
Converting from a denary number to a binary number
To change from denary into binary follow the steps:
- Draw a table. (Once the column heading is bigger than your number you can stop).
- Place a one in the column with the largest number that can be subtracted from your number.
- Subtract the column number from your number to see what remains.
- Continue subtracting until you reach \({0}\).
Example
Express the number \(27\) in binary.
\(27\) can be written as \(11011\) in binary
Check your answer : \(16 + 8 + 2 + 1 = 27\)
Question
Express \(46\) in binary.
Test section
Question 1
What is the binary number 1101 in denary?
a) 1101
b) 11
c) 13
Answer
The correct answer is c) 13.
Question 2
What is the number 63 in binary?
a) 1000001
b) 111111
c) 111110
Answer
The correct answer is b) 111111.
Question 3
What is the binary number 10001 in denary?
a) 17
b) 20
c) 33
Answer
The correct answer is a) 17.
Question 4
What is the number 130 in binary?
a) 1000010
b) 10000010
c) 10000001
Answer
The correct answer is b) 10000010.
More on M6: Algebra
Find out more by working through a topic