[go: up one dir, main page]

0% found this document useful (0 votes)
22 views5 pages

(EE303 (B) ) HW1 - Solution

KAIST 2020 digital system homework #1 solution

Uploaded by

박천우
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

(EE303 (B) ) HW1 - Solution

KAIST 2020 digital system homework #1 solution

Uploaded by

박천우
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

EE303(B) 2021 Spring HW #1

(Due: 2021-03-23 PM 11:59, on KLMS)

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)

Decimal Binary Octal Hexadecimal

100.5 1100100.1 144.4 64.8

113 1110001 161 71

107.3125 1101011.0101 153.24 6B.5

216.375 11011000.011 330.3 D8.6

202.6875 11001010.1011 312.54 CA.B

2. In each of the following cases, determine the radix r. (16pts)

(a) (372)r = (10310)4 (8pts)

3 x 𝑟𝑟 2 + 3 x 𝑟𝑟 + 3 x 1 = 1 x 44 + 3 x 42 + 1 x 4 = 308

∴ r=9

(b) (A4B)r = (2733)8 (8pts)

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)

(1) (534)8 + (736)8 (5pts)


1 1
534

+ 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

----------------- → ----------------- → - (1001011)2


(1001011)2
interchange append -

(4) (1011)2 x (1001)2 (5pts)


1011
x 1001
--------------
1011

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.

ex) 1110 (even) / 0001 (odd)

 Adjacent numbers differ in two bits.

 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.

ex) Decimal : Code

n–1 : 1000

n : 0001

n+1 : xxx1 (x can be any number, 1st digit must be 1)

This condition also apply in cases 6->7->0 and 7->0->1.

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)

(SP : Space, LF : Line Feed)

(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

poem from (b) in the memory? Explain the reason. (5pts)


No. To store the poem in memory, at least 2814 bits are needed. However, total memory bits are
less than this.

(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,

Submission format : StudentID_name.pdf (ex. 20210123_GildongHong.pdf)

If you have any problem, please send an e-mail to ee303ta@kaist.ac.kr.

You are not allowed to cheat your homework.

You might also like