fall2000-exam1-a-solution

fall2000-exam1-a-solution - ECE 206-001 NC State University...

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

View Full Document Right Arrow Icon
ECE 206-001 Name:____________________________________________ NC State University Exam 1(A): 21 September 2000 2 1. (27 points) Give the decimal value represented by each of the following 8-bit binary numbers, using each of the following representations: unsigned, sign-magnitude, two’s complement. You must show your work to get full credit. unsigned sign-magnitude two’s complement 01101001 105 105 105 11100111 231 -103 -25 10000010 130 -2 -126 (1) unsigned: 2 6 +2 5 +2 3 +2 0 = 64 + 96 + 8 + 1 = 105; sign-magnitude and two’s complement are the same, because this is a positive number (2) unsigned: 2 7 +2 6 +2 5 +2 2 +2 1 +2 0 = 128+64+32+4+2+1 = 231; sign-magnitude: sign = 1 (negative), magnitude = 2 6 +2 5 +2 2 +2 1 +2 0 = 103; two’s complement: take complement to find –X = 00011001 = 25, so X = -25 (alternative: -2 7 +(2 6 +2 5 +2 2 +2 1 +2 0 ) = -128 + 103 = -25) (3) unsigned: 2 7 +2 2 = 130; sign-magnitude: sign = 1 (negative), magnitude = 2 1 = 2; two’s complement: take complement to find –X = 01111110 = 126, so X = -126 (alternative: -2 7 +2 1 = -128 + 2 = -126) n2 n 01 12 24 38 4 16 5 32 6 64 7 128 8 256 9 512 10 1024
Background image of page 1

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

View Full DocumentRight Arrow Icon
ECE 206-001 Name:____________________________________________ NC State University Exam 1(A): 21 September 2000 3 2. (16 points) Perform the following operations in binary using
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2010 for the course ECE 109 taught by Professor Bradley during the Spring '08 term at N.C. State.

Page1 / 6

fall2000-exam1-a-solution - ECE 206-001 NC State University...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online