DOC PREVIEW
UIUC ECE 120 - Binary Representation and Arithmetic

This preview shows page 1 out of 2 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Homework 2 solution Regrade requests are due on Friday September 30 at 4 00pm First make sure you have read and understood the Course Overview and Policies then read the Homeworks page and follow the instructions outlined there Binary Representation and Arithmetic 1 Binary Addition 1 10001100 01101110 11111010 Unsigned No Overflow 2 s Complement No Overflow 2 01000110 00111100 10000010 Unsigned No Overflow 2 s Complement Overflow 3 11101100 11001110 10111010 Unsigned Overflow 2 s Complement No Overflow 4 10010111 01101001 00000000 Unsigned Overflow 2 s complement No Overflow 5 10111010 10110000 01101010 Unsigned Overflow 2 s Complement Overflow 2 Binary Subtraction 1 2 3 4 5 6 0000 1111 1110 1111 0000 1111 0001 0001 0010 0000 0111 0111 0111 1010 0111 0111 1000 0110 1111 1101 0100 1011 1011 1111 0100 1011 0100 0001 1000 1100 0111 1111 0111 1110 0111 1111 1000 0010 0000 0001 1110 1001 0010 0000 1110 1001 1110 0000 1100 1001 1011 0110 0100 1100 1011 0110 1011 0100 0110 1010 3 Designing Representations Suppose you want to convert a number that is read as a digit character Because the digits 0 to 9 are consecutive in ASCII code binary subtraction of the decimal value of the ASCII digit 0 from any other digit character gives the digit s numeric value As an example note how to convert the following ASCII digits 0 0 4810 4810 010 002 1 0 4910 4810 110 012 2 0 5010 4810 210 102 Instead of this representation with digits 0 to 9 assigned to consecutive values a new representation in which we assign random distinct patterns makes it hard to nd an effective and easy algorithm to implement the ASCII to binary conversion above 4 Interpretation of Data Types 1 2 3 4 1 198 484 582 1 198 484 582 61292 39844 Golf 5 Sorting 1 0000 0010 10 x10 2 1000 0011 133 x9A 6 Unsigned binary representation vs 2 s complement 1 Unsigned 01011010 90 01111100 124 xDD 221 xEA 234 2 s Complement xDD 35 xEA 22 01011010 90 01111100 124 2 Unsigned 01101001 105 x71 113 x8B 139 10010110 150 2 s Complement x8B 117 10010110 106 01101001 105 x71 113 7 Logical Operations 1 01110 2 10010111 3 x11 8 Conversion to Floating Point data type 1 01000010011011110000000000000000 2 00111110100110011001100110011010 9 Conversion from floating point data type 1 3 1414999961853027 2 2552 0 10 Course policies and procedures 1 Answers could vary 2 Answers could vary


View Full Document

UIUC ECE 120 - Binary Representation and Arithmetic

Download Binary Representation and Arithmetic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Binary Representation and Arithmetic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Binary Representation and Arithmetic and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?