Quiz1solutionsSp11

Quiz1solutionsSp11 - binary = 42 Dec results in = 0 0 1 0 0...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CompE 270 Digital Systems S11 NAME:_ SOLUTIONS __ Quiz #1 Quiz1solutionsSp11.doc 1 1) Binary notation has a range of valid values which depends on the number of bits and format. What is the range of valid values (in decimal notation) for: 10 pts. 6 bits, 2’s complement 10 bits, unsigned (most from: _ -2 5 = -32 __ (base 10) negative) from: 0 (base 10) to: _ +2 5 -1 ___ (base 10) (most to: +2 10 -1 = +1023 (base 10) = +31 positive) 2) Add the 8-bit UNSIGNED values (show results as 8 bits : binary, hex, and decimal notation). Indicate if the result is valid 10 pts carry: 1 1 1 1 1 FC hex 1 1 1 1 1 1 0 0 binary = 252 Dec show + 2A hex + 0 0 1 0 1 0 1 0 binary = 42 Dec results in = 0 0 1 0 0 1 1 0 binary = 38 Dec hexadecimal: (1) _ 26 ____ Result valid? No . Carry Out: C = 1_ Overflow: No . 3) Add the 8-bit 2’s comp values (show results as 8 bits : binary, hex, and decimal notation). Indicate if the result is valid 10 pts carry: 1 1 1 1 1 FC hex 1 1 1 1 1 1 0 0 binary = -4 Dec show + 2A hex + 0 0 1 0 1 0 1 0
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: binary = 42 Dec results in = 0 0 1 0 0 1 1 0 binary = 38 Dec hexadecimal: ____ 26 ____ decimal: ___ 38 ___ Result valid? Yes. Carry Out: C = 1_ Overflow: No . 4) Convert: 5 pts each a) 8 bit 2s complement 11000.110 to decimal: __-7.25 __ -16 + 8 + 0.5 + 0.25 = -7.25 Or: 11000110 2 = -58 10 then shift right 3 bits = -58/8 = -7.25 10 Since 0.001 2 = 2-3 = 1/8 > each factor of 2 == shift 1 bit Check: -7.25 *2 *2 *2 = -58 = 11000110 2 * 0.001 2 = 11000.110 2 b) Decimal -127.75 to 2s complement binary: 10000000.01 2__ (Show the minimum number of bits necessary.) +127.75 10 = -(+7F.C 16 ) -> 2s comp: 80.4 16 = 10000000.0100 2 Or -127.75 * 2 * 2 = -511 10 = 1000000001 2 * 0.01 2 = 10000000.01 2 Check: -128 + 0.25 = -127.75 c) Unsigned hex 120A to decimal: _ 4618 __ 1 * 16 3 + 2 * 16 2 + 0 * 16 + 10 * 1 4096 + 512 + 0 + 10 = 4618 10 . c) Decimal -1 to 8 bit hex: FF . 2 8- 1 = 256 - 1 = 100 16 1 = FF 16 ....
View Full Document

Ask a homework question - tutors are online