Homework 1 in Microcontrollers and practical robotics
2)
a)
16bit equivalent is a) 0000000001101011
the answer is 006B
1011 is in dec 11 and in hex B
0110 is in dec 6 and in hex also 6
b)
16bit equivalent is b) 0000000010110101
the answer is 00B5
0101 is in dec 5 and in hex also 5
1011 is in dec 11 and in hex B
3)
16bit equivalents to hex
a) 0000000001101011 => 006B
b) 1111111110110101 => FFB5
4)
a) 121 - 185 = -64
in binary it is 11000000 ( 1 in front of 1000000 shows a negative number)
b) -70 - 88 = -158
in binary it is 110011110 ( 1 in front of 1000000 shows a negative number)
5)
3A9 + 24D
9+D=6
A+4=F
3+2=5
Answer is 5F6
6)
Y = X shl 3
7)
evaluate true:
A and B
(not A)and(not B)
8)
Y = true
for i from 1 to 20
for j from 1 to 8, excluding 3
bitindex = j + (i-1)*8
if S1[bitindex] S2[bitindex]
Y = false
Exit loop
end
end
end
9)
a) V and C
b) N
10)
11)
a) 0-400 kHz
b) The delay needs to last for half the clock period, because it is in the middle of
high and low edges. Using a 100kHz EEPROM clock