1.1 number systems Flashcards
1
Q
why do computers use binary?
A
- data processed using logic gates/transistors that only have 2 states
- stored in registers
- binary number system has only 2 digits that can be used to represent a diff state
2
Q
uses of hexadecimal
A
- HTML colour codes
- error messages
- MAC/IP address
- locations in memory
3
Q
what are the rules for adding binary?
A
0+1=1
1+1=0 carry 1
1+1+1=1 carry 1
4
Q
what happens to the value in binary, denary, and hex when left shift occurs
A
binary- multiply by 2
denary- multiply by 10
hex- multiply by 16
5
Q
what is overflow
A
- value greater than 255 in 8-bit register
- value is too large to be represented by given register
- value outside limit should be returned
6
Q
what happens to the value in binary, decimal and hex when right shift occurs
A
binary- divide by 2
decimal- divide by 10
hex- divide by 16
7
Q
how is data processed in a computer
A
using logic gates and stored in registers
8
Q
advantages of hex
A
- more compact, take up less space
- easier for humans to read and understand
- less chance of human error
9
Q
how to convert to 2s complement
A
- convert to binary
- flip all bits
- add 1
10
Q
why is hexadecimal used
A
- shorter way to represent values (fewer digits than binary)
- Easier to understand/read
- Easier to debug/identify errors