ENEE 244 (01**). Spring 2006

Homework 2

Due back in class on Monday, Feb 27.

1.  Represent the number 7429 in BCD code.

7429 = 0111 0100 0010 1001 in BCD  //Just convert each digit to a 4-bit binary number.

2.  Convert the BCD number 00110101 to decimal.

0011 0101 = 35 in decimal.  //By converting groups of 4 bits into decimal.

3.  State one advantage of the 2421 code over the regular (8421) BCD code.

The 2421 code is self-complementing, that is, when its bits are complemented the 9's complement of the corresponding decimal number results.  This makes arithmetic easier.  The 8421 BCD code does not have this property.

4.  A transmitter using an even-parity scheme transmits the byte 01011011.

(a) What is the parity bit that is transmitted?

In an even parity scheme, the parity bit is chosen to make the total number of one's in the number including the parity bit be even.  The number 01011011 has 5 one's.  To make the count even, the parity bit is transmitted as 1, which makes the total number of one's even (6 in this case).

(b) Suppose during transmission only the parity bit is erroneously flipped because of interference.  Is this error detected at the receiver?

Yes, it is detected.  When the receiver re-computes the parity bit, it is re-computed as 1, which is different from the corrupted received parity bit (0).  Thus an error is detected and a re-transmit is requested, as it should be.

5.  How many distinct double-bit errors can occur in a 7-bit ASCII character? How many of these errors change the character's parity?  How many are detected?

The number of double-bit errors is simply the number of ways of choosing two bits out of seven.  From courses in probability we know that to choose m among n distinct objects, there are (n C m) ways ("n choose m"), where:

n C m =      n!                     // n! is the factorial of n = n * (n-1) * (n-2) * ... * 1
(n-m)!m!

Here n=7, m=2, therefore 7 C 2 = 7!/(5!2!) = (7 * 6)/2 = 21.  Thus there are 21 distinct double-digit errors that can occur.

None of these change the character's parity.  A single-bit error flips the parity bit but a second error flips it back to its original value.  For this reason, none of these errors are detected.

6.  Determine whether the nor operator ~ defined by a~b = (a+b)' is associative, commutative, or distributive over +.

The commutativity of nor follows directly from that of or.
a~b = (a+b)'= (b+a)' = b~a

The associative law does not hold for nor, however.
(a~b)~c = ((a+b)'+c)' = (a+b)c' = ac'+bc'
a~(b~c)  = (a+(b+c)')' = a'(b+c) = a'b+a'c ¹ ac'+bc'

To see if ~ distributes over +, we need to see if a~(b+c) = (a~b)+(a~c).
LHS = a~(b+c) = (a +(b+c))' = a'(b+c)' = a'b'c'
RHS = (a~b)+(a~c) = a'b' + a'c'.
The above expressions are not the same, so ~ does not distribute over +.

7.  We know that ac'.1 = ac'.  Write the dual of this equation.

To take the dual, + and . are replaced by each other and 0 and 1 are flipped.
Þ a+c'+0 = a+c'  is the dual.

8.  Simplify the 3-input boolean function Σ m(1,2,6,7) in terms of the inputs x, y and z.

Below, not all the steps are explained since most are obvious.

Σ m(1,2,6,7) = x'y'z + x'yz' + xyz' + xyz.
=  x'y'z + x'yz' + xy(z'+z)
=  x'y'z + x'yz' + xy
=  x'y'z + y(x'z' + x)
=  x'y'z + y(x'+x)(z' + x) // By distributive law.
=  x'y'z + y(x+z')
=  x'y'z + xy + yz'    // This cannot be simplified further

9.  Express the 3-input boolean function Σ m(2,3,4,6) in maxterm canonical form.

To convert between minterm canonical form to maxterm canonical form, we simply write the product of the remaining terms.

Thus, Σ m(2,3,4,6) = Π M(0,1,5,7).

10.  Use algebraic techniques to determine whether or not the following Boolean equation is valid:
(abd + a'b + b'd + c')(c + ab + bd)   =?       b(a+c)(a'+c') + d(b+c)

We will use algebraic manipulation to try to convert the left-hand side LHS to the same form as the right hand side RHS.
LHS = (abd+ab'+b'd+c')(c+ab+bd)
= abdc + a'bc + b'dc + c'c + abd + a'ba + b'dab + c'ab + abd + a'bd + b'db + c'bd
= abcd + a'bc + b'dc + abd + abc' + a'bd+ b'cb
=  a'bc + b'cd + abd + abc' + a'bd + bc'd
= a'bc + b'cd + (a' + a + c')bd + abc'
= a'bc + b'cd + bd + abc'

Now, we can try to transform the right hand side into this fairly simple format.
RHS = b(a+c)(a'+c') + d(b+c)
= aa'b + abc' + a'bc + bcc' + bd + cd
= abc' + a'bc + bd+ cd
= abc'+ a'bc+ bd + (b+b')cd
= abc' + a'bc + bd + bcd + b'cd
= abc' + a'bc + bd + b'cd

Thus, the LHS and RHS can be verified to be identical.