Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

a) Computers typically do not implement integer subtraction directly, but instead using addition and negation. To accomplish negation, they often use...

a) Computers typically do not implement integer subtraction directly, but instead using addition and negation. To accomplish negation, they often use the formula −x = (x ˆ 11 . . . 1) + 1, which can be Page 3 implemented using bitwise XOR and addition. The string 11 . . . 1 here represents the all 1's string of length n, where n is the width of the CPU. The addition is done modulo 2n. Verify that −x ≡ (x ˆ 11 . . . 1) + 1 (mod 2n) for n = 4 and x = 3. Show your work. (1 mark) b) The standard way of notating negative numbers in English is sign and magnitude. Basically, put a minus sign in front of a number if it is negative. This can be done in binary as well. For example, in 4 bits, the sign and magnitude encoding for −5 is 1101, where the leftmost 1 indicates a negative number. Sign and magnitude encoding is used in IEEE floating point types. What is the range (minimum to maximum) of integers that can be encoded into 8 bits using sign and magnitude encoding? (1 mark) c) One little used encoding for integers is binary coded decimal (BCD). One variation of BCD takes a number written in decimal (base-10) notation and records each numeral in 4 bits. Explain one important disadvantage of BCD encoding. (1 mark)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question