3.1: binary Flashcards
binary when a transistor is on
1
binary when a transistor is off
0
bit
can be a 0 or 1
nibble
a group of 4 bits
byte
a group of 8 bits
2 nibbles
base of denary
10
base of binary
2
highest value that can be represented by a byte
255
unsigned binary numbers
1 byte can represent positive values from 0 to 255
signed binary numbers
represents positive and negative values
decreases range of values that can be represented
sign and magnitude
assigns the most significant bit as the sign bit
1 represents a negative number
0 represents a positive number
means that only 7 bits are available
largest bit bit that can be represented = 127
values from -127 to 127
twos complement
the most significant bit represents -128 instead of 128
largest positive that can be represented is 127
largest negative number that can be represented is -128
binary addition
0+0=0
0+1=1
1+1=10
1+1+1=11
binary overflow
when there is a 9 bit which doesnt fit in the byte
disadvantage of binary overflow
one bit less available
arithmetic shift ( left shift)
multiplies by 2
you move all the bits 1 position to the left
as new 0 is shifted in
arithmetic shift (right shift)
divides by 2
you move all the bits 1 position to the right
you copy the value of the most significant bit
logical shift (left shift)
multiplies by 2
same as arithmetic left shift
you move all the bits 1 position to the left
a new 0 is shifted in
logical shift (right shift)
divides by 2
moves all the bits 1 position to the right
0 is always inserted
logical shift
used to multiply and divide unsigned binary numbers (positive numbers)
arithmetic shift
used to multiply and divide signed binary numbers (positive and negative numbers)
hexadecimal advantages
easier to read
can represent the same values effortelessly
base of hexadecimal
16
how many bits can 1 hexadecimal represent
4 bits
1 nibble
how many bytes do 2 hexadecimal represent
1
converting binary to hexadecimal
group byte into 2 nibbles
example: 10110101 turns into 1011 and 0101
uses of hexadecimal
photoshop to change colour
in computer networks to identify a device
denary to hexadecimal
0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
10 = A
11 = B
12 = C
13 = D
14 = E
15 = F