Homework2_SOL

Homework2_SOL - Please fill the following table with...

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

View Full Document Right Arrow Icon
Homework 2 1. Integer representation using 1’s and 2’s complement. Assume we have an integer type of 8bits, fill in the following table. Value 2’s complement 1’s complement Sign-Magnitude 3 0000,0011 0000,0011 0000,0011 -31 1110,0001 1110,0000 1001,1111 7 0000,0111 0000,0111 0000,0111 -64 1100,0000 1011,1111 1100,0000 0 0000, 0000 0000, 0000 or 1111,1111 1000, 0000 2. Expression evaluation in C language. In C language, if an evaluation expression contains both unsigned and signed values, then signed values will be implicitly casted into unsigned ones before evaluation.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Please fill the following table with “<” or “>”. Constant A Constant B Relation -1 0 < -1 0U > (unsigned)-7 -8 > -7 (unsigned)-8 > -7 -8 > -39278753 39278752 < -39278753 39278752U > 3. Unsigned Multiplication. Solve the following equation group step by step. Notice that each value is represented by unsigned integer of 4-bits. Solution: (b)-(a) 0001*x + 1111*y = 1111 …… (c) (c)*2 0010*x + 1110*y = 1110 …… (d) (c)+(d) 0011*x + 1101*y = 1101 …… (e) (e)-(a) 1001*y = 0100 y = 0100 0011*x = 1001 x = 0011 result: x = 0011, y = 0100...
View Full Document

Page1 / 2

Homework2_SOL - Please fill the following table with...

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

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