ce12_w08_hw2_sol

# ce12_w08_hw2_sol - Fill those bits with 1 and the rest with...

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

CMPE 12 Winter 2008 Name: SOLUTIONS Homework 2: Due January 30 Email: 1) (14 pts) Based on the logic diagram, answer these questions: a) (2) What circuit is this? A D-Latch b) (2) What would be more appropriate labels? (instead of A, B, X, Y) A=D; B= WE or Clock; X = Q; Y = Q’ c) (10) Add more logic gates to make this a negative-edge triggered Flip-Flop. See diagram below 2) (10 pts) Fill in the 'q' and 'r' outputs in this timing diagram. (Note that the triangle at the clock input indicates a flip-flop) See Diagram Below

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

View Full Document
3) (16 pts) Perform the following conversions: a) 325 10 to binary There are 2 ways of doing this: i) 325 / 2 = 162 r1 162 / 2 = 81 r0 81 / 2 = 40 r1 40 / 2 = 20 r0 20 / 2 = 10 r0 10 / 2 = 5 r0 5 / 2 = 2 r1 2 / 1 = 1 r0 1 / 2 = 0 r1 1 0 1 0 0 0 1 0 1 ii) Largest power of base goes into the number 325-2 8 = 325 – 256 = 69 69-2 6 = 69 – 64 = 5 5-2 2 = 5 – 4 = 1 1-2 0 = 1 – 1 = 0 Each bit represents a power of 2.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Fill those bits with 1 and the rest with 0’s 1 0 1 0 0 0 1 0 1 = 101000101 2 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 b) 111001001 2 to decimal As mentioned before, each bit represents a power of 2. Multiply these powers of 2 by the number in the slot then add the results together. 111001001 = 1 * 2 8 +1 * 2 7 +1 * 2 6 +0 * 2 5 +0 * 2 4 +1 * 2 3 +0 * 2 2 +0 * 2 1 +1 * 2 0 = 256 + 128 + 64 + 8 + 1 = 457 10 c) 0x4C3 to octal Binary can easily be converted between other powers of base 2 by grouping. First, we convert to binary x4 = 0100, xC = 1100, x3 = 0011 Thus the binary is: 0100 1100 0011 Next, we regroup the bits into 3’s, as 2 3 = 8 010 011 000 011 2 3 0 3 = 2303 8 d) 1062 7 to base 13 First we must convert to base 10 1062 7 = 1 * 7 3 + 0 * 7 2 + 6 * 7 1 + 2 * 7 = 343 + 0 + 42 + 2 = 387 10 Next we convert to base 13 387 / 13 = 29 r10 (any digit larger than 9 we use letters) 29 / 13 = 2 r3 2 / 13 = 0 r2 2 3 A = 23A 13...
View Full Document

## This note was uploaded on 01/06/2009 for the course CMPE 12 taught by Professor Diblas during the Fall '08 term at UCSC.

### Page1 / 3

ce12_w08_hw2_sol - Fill those bits with 1 and the rest with...

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

View Full Document
Ask a homework question - tutors are online