Tutorial 1 Solution

# Tutorial 1 Solution - = (1)01001 = 01001 (ignore the carry...

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

EE 2000 Logic Circuit Design, Semester A, 2008/09 Tutorial 1 Solution Week 2 (8 th , 10 th , 11 th September, 2008) Level 1: Review Questions Question 1: Represent the number 1234 in (a) Binary, (b) BCD, (c) Excess-3 code Answer: (a) 100 1101 0010 (b) 0001 0010 0011 0100 (c) 0100 0101 0110 0111 Question 3: A binary with n bits all of which are 1s has the value Answer: (d) 2 n - 1 Question 5: Convert (1BC.D) H into a binary number Answer: = (1 1011 1100. 1101) 2 Question 8: A class has 60 students. They need to be assigned binary roll numbers. How many bits are required? Answer: log 2 60 = 5.9 (rounded) Therefore, 6 bits are required. Question 42: Obtain the 1’s and 2’s complements of the given number 1011 0011 1011 Answer: 0100 1100 0100 (1’s complement) 0100 1100 0101 (2’s complement) Question 48: Using 2’s complement addition method, find the result of 01100 - 00011 Answer: 01100 – 00011 = 01100 + (2’s complement of 00011) The 1’s complement of 00011 is 11100 The 2’s complement of 00011 is 11101 Therefore, 01100 – 00011 = 01100 + 11101

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: = (1)01001 = 01001 (ignore the carry bit) Level 3: Challenge Exercise Question I: Determine the value of x if (211) x = (152) 8 Solution: (211) x = (152) 8 2 · x 2 + 1 · x + 1 = 1 · 8 2 + 5 · 8 + 2 2 x 2 + x – 105 = 0 (2 x + 15)( x – 7) = 0 ∴ x = 7 ( x must be a positive integer so cannot be -7.5) Question II: In the lecture, we only discuss the r ’s-complement and ( r-1)’s-complement of an integer number. Guess the 1’s complement and 2’s complement of the following fractional binary numbers. (a) 010.11 (b) 11011.100 Solution: The definition of 1’s complement and 2’s complement of integer a for an n-bit binary system are (2 n – a - 2 ) and (2 n – a ) respectively. The general formula of 1’s complement is (2 n – a – 2-m ) where m is the least significant bit. (a) 010.11 1’s complement: 2 3 - 010.11 - 2-2 = 101.00 2’s complement: 2 3- 010.11 = 101.01 (b) 11011.100 1’s complement: 2 5- 11011.100 - 2-3 = 00100.011 2’s complement: 2 5- 11011.100 = 00100.100...
View Full Document

## This note was uploaded on 02/06/2011 for the course EE 2000 taught by Professor Vancwting during the Spring '07 term at City University of Hong Kong.

### Page1 / 2

Tutorial 1 Solution - = (1)01001 = 01001 (ignore the carry...

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

View Full Document
Ask a homework question - tutors are online