Boolean Functions - Discrete Mathematics - Solved Homework, Exercises of Mathematics

This home work exercise is very helpful for the student of discrete mathematics. The major points in the exercises are: Boolean Functions, Computer Arithmetic, Two Base Two Numbers, Ways of Approaching, Binary to Hexadecimal, Computation Intensive, Binary Arithmetic Operation, 8-Bit Binary Formats, Bitwise Addition

Typology: Exercises

2012/2013

Uploaded on 04/23/2013

sarangapani
sarangapani 🇮🇳

4.5

(10)

62 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
SP12-CSE20 Discrete Mathematics
Homework 1 Solution
April 17, 2012
1 Boolean Functions and Computer Arith-
metic
1.1 Problem 2.8
Compute the difference of the two base two numbers: 11101002- 101112.
The result is 10111012. There are two ways of approaching it as follows.
Since the former number is larger than the latter, we can have directly
obtain the result by doing arithmetic operation of subtraction, as a
result, we have 11101002- 101112= 10111012.
We can also convert the latter number into its 8-bit two’s complement,
by first add zeros at the remaining high-end bits then add the two
numbers together. Notice that any carry bits will be discarded here.
As a result, we have 011101002- 000101112= 01110100 + 11101001 =
01011101.
1.2 Problem 2.9
Convert 10110111110001012from binary to hexadecimal (i.e., base 16) and
octal (i.e., base 8).
Since both 16 and 8 are power of 2, we need to split the binary digits into
subgroups of 4 and 3 digits, respectively.
1
Docsity.com
pf2

Partial preview of the text

Download Boolean Functions - Discrete Mathematics - Solved Homework and more Exercises Mathematics in PDF only on Docsity!

SP12-CSE20 Discrete Mathematics

Homework 1 Solution

April 17, 2012

1 Boolean Functions and Computer Arith-

metic

1.1 Problem 2.

Compute the difference of the two base two numbers: 1110100 2 - 10111 2. The result is 1011101 2. There are two ways of approaching it as follows.

ˆ Since the former number is larger than the latter, we can have directly obtain the result by doing arithmetic operation of subtraction, as a result, we have 1110100 2 - 10111 2 = 1011101 2.

ˆ We can also convert the latter number into its 8-bit two’s complement, by first add zeros at the remaining high-end bits then add the two numbers together. Notice that any carry bits will be discarded here. As a result, we have 01110100 2 - 00010111 2 = 01110100 + 11101001 =

1.2 Problem 2.

Convert 1011011111000101 2 from binary to hexadecimal (i.e., base 16) and octal (i.e., base 8). Since both 16 and 8 are power of 2, we need to split the binary digits into subgroups of 4 and 3 digits, respectively.

Docsity.com

ˆ Base-16 10110111110001012 → (1011)(0111)(1100)(0101) 2 → (11)(7)(12)(5) 16 → B 7 C (^516)

ˆ Base-8 10110111110001012 → (001)(011)(011)(111)(000)(101) 2 → (^1337058)

1.3 Problem 2.

Convert the following as indicated.

ˆ Convert 61502 8 to decimal 615028 = 6 × 84 + 1 × 83 + 5 × 82 + 0 × 81 + 2 × 80 = 29506

ˆ Convert EB 7 C 516 to octal EB 7 C 516 = (1110)(1011)(0111)(1100)(0101) 2 = (011)(101)(011)(011)(111)(000)(101) 2 = 3533705 8

1.4 Problem 2.

Let b, m, l, f, , z, k, a, n, y, e, x, j, w, d, v, o, u, c, g, t, p, h, s, q, i, r be the digit sym- bol list for base 27. Let n, m, k, j, f, s, q, h, z, p, c, x, y, e, d, w be the digit symbol list for base 16.

ˆ Convert hi-there from base 27 to base 16. This is computation intensive. We can first convert it into a decimal number, hithere = 22× 277 +25× 276 +4× 275 +20× 274 +22× 273 +10× 272 + 26 × 271 + 10 × 270 = 239881748167. Then we iteratively divide this decimal number by 16 and set each digit (from lowest to highest) to be the remainder. The result turn out to be 37DA 10 F EC 816 , thus jhecmnwdyh.

ˆ Convert cf emxysnnjnq from base 16 to base 27. Similar as above, we convert it backwards, and the result is study-hard.

Docsity.com