Binary Number Systems & Boolean Algebra: Complements, Arithmetic, and Gray Code, Exams of Discrete Mathematics

Various topics related to binary number systems and boolean algebra. It includes instructions for performing arithmetic operations using one's and two's complements in 6-bit and 6-digit base 10 systems, as well as in base 8. Additionally, it provides proofs and reductions for boolean expressions and shows how to express boolean functions in sum-of-products and product-of-sums forms.

Typology: Exams

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
1 Binary Number Systems
1. (one’s complement) Show the operation of 10 + (5) in 6-bit one’s comple-
ment.
2. (two’s and one’s complements) We have defined and learned the idea of two’s
and one’s complements for n-bit binary numbers. Define the corresponding
complements using an n-digit system with base 10. Show the arithmetic of x+y
where x= 21610 and y= 6510 in the corresponding complement representations
using a 6-digit system with base 10.
3. (two’s and one’s complements) We have defined and learned the idea of two’s
and one’s complements for n-bit binary numbers. Define the corresponding
complements using an n-digit system with base 8. Show the arithmetic of xy
where x= 1208and y= 278in the corresponding complement representations
using a 6-digit system with base 8.
2 Boolean Algebra
1. (proof of consensus theorem) Prove the Boolean equality ab +a0c=ab +
a0c+bc.
2. (Boolean transform) Reduce the Boolean expression f(a, b, c) = ab0+ac +
a0b+a0c0.
3. (expression in sum of products) Express Boolean function
E(x, y, z) = (x+y+x0z)0(x0y0+xy 0z) in sum-of-products form.
4. (expression in product of sums) Express Boolean function
E(x, y, z) = [(x0y+x)0(x0+y)(y0+z)]0in product-of-sums form.
5. (expression in sum of products) Express Boolean function
E(a, b, c, d) = ab + (cd +bc)0+ad in sum-of-products form.
6. (expression in product of sums) Express Boolean function
E(x, y, z) = [xy 0(x0y+z)]0in product-of-sums form.
3 Recursive function
3.1 Recursive function: formulation
1. (permutation) Suppose all the permutations on the set of {1,2,3,4,5,6}are
listed in lexicographic order.
(a) What is the RANK in the list for 563241?
(b) What permutation will have the RANK 273?
2. (tower of Hanoi) Consider the Towers of Hanoi puzzle, H(6, S, E, G). Suppose
that pole Shas washers 4,1; pole Ehas washers 3,2; pole Ghas washers 6,5.
Call this the basic configuration.
(a) What is the path in the decision tree that corresponds to the basic config-
uration?
1
Docsity.com
pf2

Partial preview of the text

Download Binary Number Systems & Boolean Algebra: Complements, Arithmetic, and Gray Code and more Exams Discrete Mathematics in PDF only on Docsity!

1 Binary Number Systems

  1. (one’s complement) Show the operation of −10 + (−5) in 6-bit one’s comple- ment.
  2. (two’s and one’s complements) We have defined and learned the idea of two’s and one’s complements for n-bit binary numbers. Define the corresponding complements using an n-digit system with base 10. Show the arithmetic of −x+y where x = 216 10 and y = 65 10 in the corresponding complement representations using a 6-digit system with base 10.
  3. (two’s and one’s complements) We have defined and learned the idea of two’s and one’s complements for n-bit binary numbers. Define the corresponding complements using an n-digit system with base 8. Show the arithmetic of −x−y where x = 120 8 and y = 27 8 in the corresponding complement representations using a 6-digit system with base 8.

2 Boolean Algebra

  1. (proof of consensus theorem) Prove the Boolean equality ab + a′c = ab + a′c + bc.
  2. (Boolean transform) Reduce the Boolean expression f (a, b, c) = ab′^ + ac + a′b + a′c′.
  3. (expression in sum of products) Express Boolean function E(x, y, z) = (x + y + x′z)′(x′y′^ + xy′z) in sum-of-products form.
  4. (expression in product of sums) Express Boolean function E(x, y, z) = [(x′y + x)′(x′^ + y)(y′^ + z)]′^ in product-of-sums form.
  5. (expression in sum of products) Express Boolean function E(a, b, c, d) = ab + (cd + bc)′^ + ad in sum-of-products form.
  6. (expression in product of sums) Express Boolean function E(x, y, z) = [xy′(x′y + z)]′^ in product-of-sums form.

3 Recursive function

3.1 Recursive function: formulation

  1. (permutation) Suppose all the permutations on the set of { 1 , 2 , 3 , 4 , 5 , 6 } are listed in lexicographic order.

(a) What is the RANK in the list for 563241?

(b) What permutation will have the RANK 273?

  1. (tower of Hanoi) Consider the Towers of Hanoi puzzle, H(6, S, E, G). Suppose that pole S has washers 4, 1; pole E has washers 3, 2; pole G has washers 6, 5. Call this the basic configuration.

(a) What is the path in the decision tree that corresponds to the basic config- uration?

Docsity.com

(b) What was the move that produced the basic configuration and what was the configuration from which that move was made?

(c) What was the move just prior to the one that produced the basic configu- ration and what was the configuration from which that move was made?

(d) What will be the move just after the one that produced the basic configu- ration?

(e) What is the RANK, in the list of all moves of H(6, S, E, G), of the move that produced the basic configuration?

  1. (Gray code) Consider − GRAY−−−→ (6).

(a) What is the element just before 101010 and just after 101010?

(b) What is the first element of the second half of the list?

(c) What is the RANK of 111111?

(d) What is the element of RANK 37?

4 Recursive function: induction

  1. Prove that any n distinct lines drawn in the plane will always partition the plane into (n^2 + n + 2)/2 regions. Suppose that no two lines are parallel and no three intersect at the same point.
  2. Use induction to prove the following identity for any positive integer n: 1 × 2 + 2 × 3 + ... + n × (n + 1) = n(n + 1)(n + 2)/ 3

4.1 Recursive function: analysis

  1. A frog knows 5 jumping styles (A, B, C, D, E). A, B jump forward by 1 foot, and C, D, E jump forward by 2 feet. Let ai denote the number of ways to jump over a total distance of i feet. (a) What is a 1 , a 2 , a 3? (b) Derive the recursive formula of an? (c) Find the solution of the recursion.
  2. Find the solution of the following recurrence:

an = −an− 1 + an− 2 + an− 3 a 0 = 0 a 1 = 0 a 2 = 1

  1. Consider the following homogeneous linear recurrence relation: an = 3ran− 1 − 3 r^2 an− 2 +r^3 an− 3. Show that an = c 1 rn^ +c 2 nrn^ +c 3 n^2 rn^ satisfies the recurrence relation, where c 1 , c 2 , and c 3 are constant coefficients.

Docsity.com