0% found this document useful (0 votes)
74 views2 pages

Homework 1: Problem 1.1

This document contains the solutions to homework problems from a computer architecture and programming languages course. It includes solutions to binary, hexadecimal, and BCD number conversion problems, as well as truth tables for logic gates AND and OR.

Uploaded by

Alex Hambasan
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)
74 views2 pages

Homework 1: Problem 1.1

This document contains the solutions to homework problems from a computer architecture and programming languages course. It includes solutions to binary, hexadecimal, and BCD number conversion problems, as well as truth tables for logic gates AND and OR.

Uploaded by

Alex Hambasan
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/ 2

Computer Architecture and Programming Languages Course: CO20-320241

Jacobs University Bremen September 18, 2018


Alexandru Hambasan

Homework 1

Problem 1.1
Solution:

a) (10100)2 = 1 ∗ 24 + 1 ∗ 22 = 2010
b) (11011011)2 = 1 ∗ 27 + 1 ∗ 26 + 1 ∗ 24 + 1 ∗ 23 + 1 ∗ 21 + 1 ∗ 20 = 21910
c) (001001001)2 = 1 ∗ 26 + 1 ∗ 23 + 1 ∗ 20 = 7310

d) (111111111111)2 = 1 ∗ 211 + 1 ∗ 210 + ... + 1 ∗ 21 + 1 ∗ 20 = 409510


e) (75077)8 = 7 ∗ 84 + 5 ∗ 83 + 7 ∗ 81 + 7 ∗ 80 = 3129510
f) (12101)3 = 1 ∗ 34 + 2 ∗ 23 + 1 ∗ 22 + 1 ∗ 20 = 10210

g) (26601)7 = 2 ∗ 74 + 6 ∗ 73 + 6 ∗ 72 + 1 ∗ 70 = 715510
h) (431021)5 = 4 ∗ 55 + 3 ∗ 54 + 1 ∗ 53 + 2 ∗ 51 + 1 ∗ 50 = 1451110

Problem 1.2
Solution:
a) (4272)10 → (1000010110000)2
4272/2 = 2136 R = 0
2136/2 = 1068 R = 0
1068/2 = 534 R = 0
534/2 = 267 R = 0
267/2 = 133 R = 1
133/2 = 66 R = 1
66/2 = 33 R = 0
33/2 = 16 R = 1
16/2 = 8 R = 0
8/2 = 4 R = 0
4/2 = 2 R = 0
2/2 = 1 R = 0
1/2 = 0 R = 1

D16 E16 B16


b) ⇒ (DEB)16 = 1101111010112
1101 1110 1011

c) (B8C)16 = 11 ∗ 162 + 8 ∗ 161 + 12 ∗ 160 = 296010


d) (29D8)16 = 2 ∗ 163 + 9 ∗ 162 + 13 ∗ 161 + 8 ∗ 160 = 1071210

e) 8CF, 8D0, 8D1, 8D2, 8D3


Problem 1.3
Solution:
7 3 2
a) ⇒ 73210 = (0111 0011 0010)BCD
0111 0011 0010

b) Invalid BCD codes are the 4 digit binary numbers that come after 1001 (910 ): 1010, 1011,
1100, 1101, 1110, 1111.
1001 0101 0010
c) ⇒ (1001 0101 0010)BCD = 95210
9 5 2

64 32 16 8 4 2 1
d) ⇒ 7710 = 010011012
1 0 0 1 1 0 1
0100 1101
⇒ 7710 = 4D16
4 D

64 32 16 8 4 2 1
e) ⇒ 10910 = 011011012
1 1 0 1 1 0 1
0110 1101
⇒ 7710 = 4D16
6 D

Problem 1.4
Solution:

a) iii) AND
b) i) OR

Problem 1.5
Solution:
A B C x
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Problem 1.6
Solution:
A B C D x
0 0 0 0 0
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 1
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1

You might also like