Você está na página 1de 4

Tripoli University/Electrical & Electronic Engineering Dept.

EE234/Spring2017

Answer of Homework #1

Q1) Express the following numbers in Decimal:

(0101101.101)2 (26.24)8 (DA4.C)16

(0101101.101)2 in Decimal system:


026+125+024+123+122+021+120+12-1+02-2+12-3
32+8+4+1+0.5+0.125 = (45.625)10

(26.24)8 in Decimal:
281+680+28-1+48-2 = (22.3125)10

(DA4.C)16 in Decimal:
13162+10161+4160+1216-1 = (3492.75)10

....................................................................................................................

Q2) Convert the Hexadecimal number (68BD)16 to Octal and to Binary.

First convert (68BD)16 to Binary where each hexadecimal digit can be represented
with 4 binary bits:

(68BD)16 = (0110 1000 1011 1101)2

In Octal: 000 110 100 010 111 101= (64275)8

....................................................................................................................

Q3) Convert the Decimal number (193.75)10 to Binary, Octal and Hexadecimal.

In Binary: Integer Part: 193

Operation Result Reminder


193/2 96 1
96/2 48 0
48/2 24 0
24/2 12 0
12/2 6 0
6/2 3 0
3/2 1 1
1/2 0 1

(193)10 = (11000001)2

1
Tripoli University/Electrical & Electronic Engineering Dept. EE234/Spring2017

Floating Part: 0.75

Operation Result
0.752 1.5
0.52 1.0

(0.75)10= (0.11)2
The number (193.75)10 = (11000001.11)2

In Octal: Integer Part: 193

Operation Result Reminder


193/8 24 1
24/8 3 0
3/8 0 3

Floating Part: 0.75

Operation Result
0.758 6.0

The number (193.75)10 = (301.6)8


Also we can find the same octal number from its equivalent in binary.

In Hexadecimal: Integer Part: 193

Operation Result Reminder


193/16 C 1
C/16 0 C

Floating Part: 0.75

Operation Result
0.7516 C

The number (193.75)10 = (C1.C)16


We can find the same hexadecimal number from its equivalent in binary.

....................................................................................................................

Q4) Obtain the 1's complement and 2's complement of the following binary
numbers:
11001010
00101011

2
Tripoli University/Electrical & Electronic Engineering Dept. EE234/Spring2017

11000000
00111110

11001010 ==> 1's complement: 00110101


2's complement: 00110110

00101011 ==> 1's complement: 11010100


2's complement: 11010101

11000000 ==> 1's complement: 00111111


2's complement: 01000000

00111110 ==> 1's complement: 11000001


2's complement: 11000010

....................................................................................................................

Q5) Find the 9's and 10's complements of the following Decimal numbers:
973300
154321
682399

973300 ==> 9's complement: 026699


10's complement: 026700

154321 ==> 9's complement: 845678


10's complement: 845679

682399 ==> 9's complement: 317600


10's complement: 317601

....................................................................................................................

Q6) With 8-bit sign-magnitude representation, what positive integers can be


represented and what negative integers can be represented?

-12710 ... 0 ... +12710

....................................................................................................................

Q7) Find the result of the following operations on signed binary numbers:

+1001 101000
10101 + 111000

3
Tripoli University/Electrical & Electronic Engineering Dept. EE234/Spring2017

+1001 101000

001001
+ 011000 (2s complement)
Result: 100001 No carry bit, therefore 2s complement of 100001 is 011111.
Hence the answer = 011111
....................................................................................................................

10101 + 111000

+101011 (2s complement)


+111000
Result: 1100011 Discard the carry bit, the answer = + 100011

....................................................................................................................

Q9) Represent the decimal number 6248 in BCD, Excess-3, 2421 and Gray code.

(6248)10 = (0110 0010 0100 1000)BCD = (1001 0101 0111 1011)excess-3


(6248)10 = (0110 0010 0100 1110)2421
(6248)10 = (1100001101000)2 = (1010001011100)Gray

....................................................................................................................

Q10) Encode the word "Digital" to ASCII code with even-parity detection code.

"Digital" = (01000100 01101001 11100111 01101001 01110100 11100001


01101100)ASCII

The most significant bit is the even-parity bit.

Você também pode gostar