Mallard ECE 290_ Computer Engineering I - Spring 2009 - HWK #2 Solutions

# Mallard ECE 290_ Computer Engineering I - Spring 2009 - HWK #2 Solutions

This preview shows pages 1–3. Sign up to view the full content.

3/29/09 8:31 PM Mallard ECE 290: Computer Engineering I - Spring 2009 - HWK #2 Solutions Page 1 of 12 HWK #2 Solutions Problem 2.1 a. If X has no errors, it must have an even number of ones - because an even parity bit was appended when it was sent. So we need to output a 1 when X has an odd number of ones. This sounds like a job for the XOR function! Using the least number of gates, we simply use an 8-input XOR gate: Important fact: A multiple input XOR gate outputs 1 when an odd number of its inputs are 1. Indeed, (XOR is often referred to as the "odd" function.) b. You will have a tough time trying to find an 8-input XOR gate, so instead we build this circuit from 2-input XOR gates. Problem 2.2 (a) and (b) y + xy'z' + xz = x + y is proved below. The dual is proved to the right: y (x + y' + z') (x + z) = xy . Notice that the proofs are dual: each step of the right proof is the dual of that same step in the left proof. y + xy'z' + xz y (x + y' + z') (x + z) = y + xz' + xz no-name = y (x + z')(x + z) = y + x(z' + z) distributive = y(x + z'z) = y + x1 x+x'=1 (compl) = y (x + 0) = y + x identity = yx

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
3/29/09 8:31 PM Mallard ECE 290: Computer Engineering I - Spring 2009 - HWK #2 Solutions Page 2 of 12 (c) (d + b' + bc'd) (bd + ad'e + abe) = (d + b') (bd + ad'e + abe) absorption = (d + b') (bd + ad'e) consensus = (d + b') bd + (d + b') ad'e distributive = bd + (d + b') ad'e absorption = bd + ab'd'e no-name (Note: Technically, involution was also used: (b' + d) d' = (b' + d'') d' = b'd'.) Problem 2.3 a. AND does distribute over XOR. because a(b XOR c) = ab XOR ac a(b XOR c) = a(b'c + bc') defn of XOR = ab'c + abc' distributive = a(a'+b')c + ab(a'+c') no-name (2ce) = ac(ab)' + ab(ac)' deMorgan (2ce) = ab XOR ac defn of XOR b. XOR does not distribute over AND. because a XOR bc (a XOR b)(a XOR c) We need only find a counterexample. If XOR does distribute over AND, then the LHS must equal the RHS for all 8 possible combinations of a, b, c values. To prove that XOR does not distribute over AND, we need only find a single a,b,c input combination for which the LHS does not equal the RHS. Counterexample: for a,b,c = 1,0,1 then a XOR bc = 1 XOR 0*1 = 1 XOR 0 = 1 (a XOR b)*(a XOR c) = (1 XOR 0)*(1 XOR 1) = 1*0 = 0 Hence, a XOR bc does not equal (a XOR b)*(a XOR c) and so XOR does not distribute over AND. An alternative response would have been to give a different counterexample: For a,b,c = 1,1,0 then
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/16/2009 for the course ECE 290 taught by Professor Brown during the Spring '08 term at University of Illinois at Urbana–Champaign.

### Page1 / 12

Mallard ECE 290_ Computer Engineering I - Spring 2009 - HWK #2 Solutions

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online