(EE303 (B) ) HW1 - Solution
(EE303 (B) ) HW1 - Solution
1. Convert the following numbers from the given base to the other three bases listed in the table.
Fill in the blanks. (2pts for each, total 24pts)
3 x 𝑟𝑟 2 + 3 x 𝑟𝑟 + 3 x 1 = 1 x 44 + 3 x 42 + 1 x 4 = 308
∴ r=9
10 x 𝑟𝑟 2 + 4 x 𝑟𝑟 + 11 x 1 = 2 x 83 + 7 x 82 + 3 x 8 + 3 x 1 = 1499
∴ r = 12
3. Perform arithmetic operations of the following numbers without using conversion.
(Entire process should be included on your answer sheet.) (20 pts)
(correct process +2pts, correct answer +3pts for each problem)
+ 736
------------
(1 4 7 2)8
(2) (4A)16 x (42)16 (5pts)
4A
x 42
-----------
94
128
-----------
(1 3 1 4)16
(3) (101011)2 - (1110110)2 (5pts)
101011 1110110
- 1110110 - 101011
0000
0000
1011
----------------
(1100011)2
4. In this question, you want to code decimal numbers (0~7) to 4-bit binary numbers. Fill in the
blanks following the conditions below. (4pts for each, total 20pts)
If the number of 1’s in the right 3 bits is even, the leftmost bit is 1. Otherwise, 0.
If a digit in same position of two sequent codes is switched from 0 to 1, the code of the
next number must has 1 in same position.
n–1 : 1000
n : 0001
Decimal Code
0 1000
1 1011
2 0111
3 0100
4 0001
5 1101
6 1110
7 0010
5. The table below shows the American Standard Code for Information Interchange (ASCII). It uses
7-bits to represent 94 graphic printing characters and 34 non-printing characters. Answer the
following questions. (20pts)
(a) Code the sentence “I am a boy.” using the ASCII code table. (5pts)
1001001 0100000 1100001 1101101 0100000 1100001 0100000 1100010 1101111 1111001 0101110
I SP a m SP a SP b o y .
or including 0100010 (“) at the begin and end of the sentence.
(-1pt for each incorrect or missing character. It is only correct if each character is coded in 7-bit binary.)
(b) If you want to store the poem with 402 characters by using the ASCII code. How many memory
bits are required to store the poem? (5pt)
7 x 402 = 2814 bits
(c) Unfortunately, you can use only 2048 memory bits for storing the poem. Can you store the
(d) To reduce the number of bits of memory required to store the poem from (b), you are trying
to code characters by your coding method. Assume that capital letters “Y, I, W”, all small letters,
and 2 non-printing characters are used in the poem. Can you code the poem that can be stored in
2048 memory bits? Explain the reason. (5pts)
Yes. 26 + 3 + 2 = 31 types of characters can be coded by using 5 bits. 5 bits * 402 = 2010 bits
It is less than total memory bits.
Please note that,