1.1 Data representation Flashcards
What is binary?
A base 2 number system where all numbers and data are represented by using 0’s and 1’s
What are the advantages of using binary? (4)
- transmitted easily and reliable
- can be stored and read very easily
- Computers use circuits that can only be on or off (they only have 2 states), so they work well with binary calculations
- the input voltage into computers is not very stable (decreases as the battery decreases), only a system with no voltage would be reliable
What is a bit?
An individual 1 or 0
What is a byte?
Each group of 8 bits
What is a nibble?
4 bits, or half a Byte
What is Hexadecimal?
a Base 16 number system that increases in powers of 16
What is the denary value for FB3 (hex)?
4019
What are the advantages of Hexadecimal? (2)
- Large numbers can be represented in a smaller number of digits (more accurate readings by humans)
- humans can work in hexadecimal when working with binary
Every _ binary digits is equal to one hexadecimal digit
4
Steps to change from binary to hex? (3)
- split the binary into nibbles
- find the denary value for each nibble
- convert denary value into the corresponding hex digit
What are the uses of hexadecimal? (2)
- colours in HTML and CSS
- Media Access Control address (MAC address) - a unique identifier assigned to a network interface controller (NIC)
What is machine code?
Instructions that are executed by the CPU, but they’re in binary
What is assembly language?
Instructions that are executed by the CPU, but they’re written in words and numbers (e.g. python)
What is the difference between machine code and assembly language?
Machine code is in binary and assembly language is written with words and numbers
What is the difference between a kilobyte and a kibibyte?
A kilobyte is 10^3 bytes (1000) and a kibibyte is 2^10 bytes (1024)
To what power are binary prefixes and decimal prefixes?
Binary - powers of 2
Decimal - powers of 10
In one’s compliment, what do the values in the sign column mean?
0 - positive
1 - negative
How is the one’s complement used?
All the binary digits are flipped to form the negative equivalent of a number
What is the most significant bit in two’s complement?
The leftmost bit
How is the two’s complement used?
- all the binary digits are flipped
- then one is added
What is an overflow error? (2)
- When a bit has been carried into the position that has a negative place value (e.g. both numbers are positive but the place value is a 1)
- can also happen when the correct result cannot be stored in 8 bits
When can overflow error happen? (2)
- adding 2 positive numbers produces a 1 as the most significant bit
- adding 2 negative numbers produces a 0 as the most significant bit
What is BCD (Binary Coded Decimal)?
A form of binary representation where each denary digit is converted individually into binary
What are the advantages of BCD? (3)
- easier for humans to read large binary than if the number is in pure binary
- Simple to create hardware that only counts in decimal and uses basic calculation (e.g. digital clocks, simple calculators)
- BCD removes problems of floating point rounding errors, making it useful for handling financial transactions