You are on page 1of 2

THE CHINESE UNIVERSITY OF HONG KONG

Department of Systems Engineering and Engineering Management


ENGG2020B Digital Logic and Systems
Assignment 1

Instruction:

Show your work clearly. Show all

cin

and/or in, if any.


b

Question 1.

Convert the following given numbers to other number systems.


Decimal
Binary
Hexadecimal
(a) 108
?
?
(b)
?
1100 1011 0110
?
(c)
?
?
AB3
Question 2.

Find the value and the 8-bit representations of the following given numbers.
(a)
(b)
(c)
(d)
(e)

Decimal Sign-Magnitude Ones' Complement Two's Complement Excess-127


Value Representation Representation
Representation Representation
86
?
?
?
?
?
0011 1110
?
?
?
?
?
1110 0011
?
?
?
?
?
0111 1100
?
?
?
?
?
0111 1011

Question 3.

Perform the following unsigned binary number arithmetic.


(a) 0110 1100 + 0011 1010
(b) 0110 1100 0011 1010
(c) 1101  1101 (show all partial products; you can ignore the steps of adding 0 to a partial
product)
(d) 1100 1001  1101 ( nd quotient and remainder)
Question 4.

Perform the following 8-bit signed binary number arithmetic and identify over ow, if any.
(a) 0101 1100 + 1010 1110 (signed-magnitude representations)
(b) 0101 1100 1010 1110 (signed-magnitude representations)
(c) 0101 1100 + 1010 1110 (two's-complement representations)
(d) 0101 1100 1010 1110 (two's-complement representations)
(e) 0101 1100 + 1010 1110 (ones'-complement representations)
(f) 0101 1100 1010 1110 (ones'-complement representations)
1

(g) 1010 1110 + 0101 1100 (excess-127 representations)


(h) 1010 1110 0101 1100 (excess-127 representations)
Question 5.

Perform the following unsigned binary-coded decimal number arithmetic.


(a) 0101 0110 0100 + 0010 0111 1000
(b) 0101 0110 0100 0010 0111 1000
Question 6.

Suppose that a particular machine uses 8 bits to represent a binary oating-point number in
scienti c notation with the following convention:
 bit 7 (1 bit) represents the sign ;
 bits 6{4 (3 bits) represent the exponent in excess-3 representation;
 bits 3{0 (4 bits) represent the mantissa (with rounding).
Convert the decimal number 12 85 to binary oating-point number with 4 binary places in
normalized scienti c notation (use rounding if necessary), hence nd its representation in that
machine (use rounding if necessary).
S

Question 7.

Perform the following arithmetic and give the answers in binary oating-point numbers with
8 binary places in scienti c notation (use rounding if necessary).
(a) 1 11011001  24 + 1 01010011  22
(b) 1 00000001  23 1 01111011  2 1
:

You might also like