Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MATH18584 Fundamentals of Computer Mathematics

• Assignment #1
• This assignment will be graded out of 25.
• This assignment is to be completed individually. Assignments copied in whole or in part
will receive a grade of ZER0.
• You must show your work for full marks!
• Due Date: As per SLATE calendar.
• Answers may only be submitted in the following formats:
o Microsoft Word Document (.docx)
o Adobe PDF Document (.pdf)
o Do not submit external links. Scanned documents need to be legible and in
pdf format.

1. Evaluate the following singed binary number. (2 marks each)

01110110
- 00111101

0 0 1 1 1 1 0 1 → ONE’s Complement
11000010

1 1 0 0 0 0 1 0 → TWO’s Complement
+ 1
11000011

1 1 1
01110110
+ 11000011
100111001

100111001
00111001

00111001bin
2. Solve. (2 marks each)

Decimal Hexadecimal
10 A
11 B
12 C
13 D
14 E
15 F

a) A459 + 4CF6

1 1
A459 20 - 16 = 4
+ 4CF6 17 - 16 = 1
F14F

F14Fhex

b) 8B3 – 6C4

26
7 A 19
8B3
- 6C4
1EF

1EFhex
3. Convert the following decimal numbers. Show all your steps. (2 marks each)

a) 146dec to binary

2 146 R
2 73 0
2 36 1
2 18 0
2 9 0
2 4 1
2 2 0
2 0 1

10010010bin

b) 4012dec to hexadecimal

16 4012 R HEX Decimal Hexadecimal


16 250 12 C 10 A
16 15 10 A 11 B
16 0 15 F 12 C
13 D
FAChex 14 E
15 F
4. Convert the following: (1 mark each)

Binary Hexadecimal
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 A
1 0 1 1 B
1 1 0 0 C
1 1 0 1 D
1 1 1 0 E
1 1 1 1 F

a) 5FA63hex to binary

5 F A 6 3
0101 1111 1010 0110 0011

0101 1111 1010 0110 0011

01011111101001100011bin

b) 01110001110100010001101bin to hexadecimal

[ 011 ] [ 1000 ] [ 1110 ] [ 1000 ] [ 1000 ] [ 1101 ]


0 [ 011 ] [ 1000 ] [ 1110 ] [ 1000 ] [ 1000 ] [ 1101 ]
[ 0011 ] [ 1000 ] [ 1110 ] [ 1000 ] [ 1000 ] [ 1101 ]

0011 1000 1110 1000 1000 1101


3 8 E 8 8 D

38E88D

38E88Dhex
5. Natasha would like to buy a car that costs 57C6hex dollars. She has $20,000 in the bank and
her brother will give her $100110100111bin. Can she afford the car? (3 marks)

Cost of car in hexadecimal = $57C6hex


Natasha has in decimal = $20000dec
Natasha’s brother has in binary = $100110100111bin

Cost of car in decimal:

a) 57C6hex to decimal

[ 53 ] [ 72 ] [ C1 ] [ 60 ] Decimal Hexadecimal
[ 53 ] [ 72 ] [ 121 ] [ 60 ] 10 A
11 B
5 x 163 + 7 x 162 + 12 x 161 + 6 x 160 12 C
20480 + 1792 + 192 + 6 13 D
22470 14 E
15 F
22470dec

Natasha’s brother has in binary:

b) 100110100111bin to decimal

[ 111 ] [ 010 ] [ 09 ] [ 18 ] [ 17 ] [ 06 ] [ 15 ] [ 04 ] [ 03 ] [ 12 ] [ 11 ] [ 10 ]
1x211 + 0x210 + 0x29 + 1x28 + 1x27 + 0x26 + 1x25 + 0x24 + 0x23 + 1x22 + 1x21 + 1x210
2048 + 0 + 0 + 256 + 128 + 0 + 32 + 0 + 0 + 4 + 2 + 1
2471

2471dec

Cost of car in decimal = $22470dec


Natasha has in decimal = $20000dec
Natasha’s brother has in decimal = $2471dec

Total Natasha can use to pay for the car = $20000dec + $2471dec
= $22471dec
Cost of car = - $22470dec
Remaining change $00001dec

Yes, Since the price of the car is $22470dec, with the total $22471dec that Natasha has
from her bank account and brother, she will be able to afford the car with $1dec to
spare.
6. Find the truth value of each of the expressions below, using the truth values shown. Show
all your steps. (2 marks)

𝐹 ∗ ~(𝐸 ∗ 𝐷) ⟷ ~(𝐷 ∗ 𝐸 + 𝐹) ∗ 𝐷, 𝑤ℎ𝑒𝑟𝑒 𝐷 = 1, 𝐸 = 0, 𝐹 = 1

(1) * ~(0 ∗ 1) ⟷ ~(1 ∗ 0 + 1) ∗ 1


(1) * ~(0) ⟷ ~(1) ∗ 1
(1) * 1 ⟷ 0 ∗ 1
1⟷0
0

The truth value = 0

7. Using the Identities and Laws of Boolean Algebra, simplify the following expressions. List
the specific law used for every simplification. (2 marks each)

a) ~(~𝐵 ∗ 𝐴 + ~𝐵) + 𝐴
(~~B + ~A) * ~~B + A Demorgan’s Theorm
(B + ~A) * ~~B + A Law of Double Negation
(B + ~A) * B + A Law of Double Negation
B * B + B * ~A + A Distributive Law
B + B * ~A + A Idempotent Law
B+A Absorption/Redundancy Law

B+A

b) 𝐴 ∗ 𝐵 ∗ ~𝐶 + 𝐴 ∗ 𝐵 + 𝐴 ∗ 𝐶 + 𝐴
A*B+A*C+A Absorption/Redundancy Law
A*C+A Absorption/Redundancy Law
A Absorption/Redundancy Law

A
8. Use truth tables to show that the left-hand side of this equation is logically equivalent to the
right-hand side of the equation: (2 marks)

~(𝑋 ∗ 𝑌) = ~𝑋 + ~𝑌

X Y X*Y ~(X * Y) ~X ~Y ~X + ~Y
0 0 0 1 1 1 1
0 1 0 1 1 0 1
1 0 0 1 0 1 1
1 1 1 0 0 0 0

As we can see from the truth table, the left-hand side of the equation ~(𝑋 ∗ 𝑌) and the
right-hand side of the equation ~𝑋 + ~𝑌 have the same output for all possible input
values, this proves that they are logically equivalent and the equation ~(𝑋 ∗ 𝑌) = ~𝑋 +
~𝑌 is valid.

You might also like