Binary Flashcards
(areas covered: using binary, unsigned integers, two's complement and sign and magnitude signed integers, binary addition, logical and arithmetic shifts, overflow, hexadecimal)
What do computers use binary to do?
- To represent data, such as numbers, text, sound and graphics
- To program instructions
What is 4 bits known as?
A nibble
What is 8 bits known as?
A byte
(Exam-style question)
Explain one reason why all instructions and data used by a computer are represented in binary. (3)
- A processor consists of billions of transistors, each having just two states, on/off
- The on/off states of a transistor represent the binary digits 1/0
(Exam-style question)
Describe a ‘bit’. (2)
- A bit is short for binary digit, the smallest unit of data in a computer
- A bit has a single binary value, either 0 or 1
(Exam-style question)
Give one reason why a computer doesn’t need to know what a binary pattern represents. (1)
The microprocessor hardware only operates on bits, so it has no concept of type or representation
(Exam-style question)
Write an arithmetic expression to show that 256 different colours can be represented in 8 bits. (1)
2⁸ = 256 colours
What can denary numbers also be called?
Decimal numbers
(Exam-style question)
Explain one reason why the denary number 256 cannot be represented in an 8-bit binary pattern. (2)
- The number would be represented in binary as 100000000
- You would need 9 bits to store it
Convert the following denary numbers into 8-bit binary numbers:
a) 203
b) 241
c) 79
d) 100
a) 11001011
b) 11110001
c) 01001111
d) 01100100
Convert the 8-bit binary pattern 11011001 into a denary number.
217
List two ways of representing signed integer numbers.
- Two’s complement
- Sign and magnitude
What happens if the most significant bit of a two’s complement or sign and magnitude pattern is 1?
The number will have a negative value
(Example)
Convert -10 to binary two’s complement.
- Write out the positive number (+10) in binary: 00001010
- Flip all the bits: 11110101
- Add 1 (00000001) to the result. This gives: 11110110
- Therefore, -10 in two’s complement is 11110110
(Exam-style question)
Convert the denary number -54 to 8-bit binary two’s complement representation. (3)
11001010