1.1 Number Systems
Any form of data needs to be converted to binary to be processed by a computer.
Denary+Binary+Hexadecimals
- Binary system : Base 2. Represented using 0 and 1
- Denary system: Base 10. Represented with numbers from 0-9
- Hexadecimal: Base 16. Represented with symbols 0-9 and letters A-F
Explain why a computer can only process binary data
- Computer consist of transistors/logic circuits
- ..that can only store process data in two states(on/off)
What is an overflow error? When does it occur?
- A computer has a predefined limit that it can represent (eg. 8bits)
- ..Overflow occurs when a value outside this limit should be returned
- Can occur when two binary numbers are added together
- …the result is cannot be represented in the current register.
- eg. 255+10 in binary cannot be represented in the current size of the register.
- Solution: use a 16 bit/2byte register
Uses of hexadecimals:
- Error codes. Eg#404
- Representation of colours on a website. Eg FFFFFF
- Memory dumps: output the contents of memory on screen
MAC address:
- made up of 48 bits
- shown as 6 groups of two hexadecimal digits
- First half represents Manufacturer
- Second half represents Serial number
- Uniquely identifies a device on the network
- eg. 11:11:11:11:11:11
- MEDIA ACCESS CONTROL (only use if not referred by the question!)
Why do programmers/developers use hexadecimal (vs binary)
- Shorter in length compared to binary eg. Hex FFF1 🡪binary 1111111111110001
- …Making them easier to read/understand
- …Easier to debug