The purpose of these excercises are to refresh what you learned on binary numbers, and help the logic simulation labs in the next few weeks. They are ungraded.
The Corellian currency is based on hexadecimal, but currency in Mos Eisley is based on octal. Han Solo is trying to pay for the mess he made at the cantina but the only converters he can find only exchange between hex and binary or binary and octal-based currency. Convert the following numbers from hexadecimal to binary to octal without multiplying or dividing. Show the steps you used to arrive at the answer and explain the purpose of each.
(Hint: Think about groupings.)
$C45A0_{16}$$FF7B2_{16}$Luke has returned to Tatooine and needs to exchange his octal-based currency for the local hexadecimal-based currency. Convert the following octal numbers to binary to hexadecimal. (Again, show your steps and explain them.)
$42773_8$$65413573210_8$Jabba’s accountant needs to calculate how many credits Han owe his boss. Do the following unsigned addition/subtraction problems. Be sure to show your carries/borrows! If you don’t, the accountant goes into the rancor pit! For the purpose of this problem, assume that words have an infinite width. That is, don’t truncate.
$ABBABA_{16}+981CD_{16}$$01010111_2 +10111011_2$$73237_8 −55451_8$$11100111111011_2 −10101000111001_2$As part of their training, all stormtroopers must demonstrate the ability to do 2’s complement arithmetic. Compute the following with 8-bit 2’s complement arithmetic, answering the following questions for each problem.
Examples:
$(−27)_{10} +101_{10}$
(a) 1100101$_2$ (b) −11011$_2$ (c ) 11100100$_2$ (d) 11100101$_2$ (e) 01001010$_2$
$(−76)_{10} +65_{10}$
$(−20)_{10} +20_{10}$
Chewbacca was trying to fix the hyperdrive in the Millenium Falcom when a toolbox fell on his head. Now he needs you to do the following in 8-bit 2’s complement binary arithmetic: $(−89)_{10} + (−41)_{10}$. Be sure to show the stages you went through to get your answer.
But wait! Something went wrong! The hyperdrive is down again! Explain the problem with this answer and give a simple procedure for detecting it.
Note: The Thu 12-1 lecture slot is used in _some weeks_.