CMPT 150 Lecture Notes - Binary Number, Boolean Expression, Dispatch Table

70 views6 pages

Document Summary

With sign-magnitude encoding system, the most signi cant bit of the sequence speci es the sign: 0 if positive, 1 if negative. The remaining bits determine the magnitude of the integer. Therefore y = y + 2n 1 ( + = or ) where n is the number of bits in the codeword. Thus to convert from decimal to sign-magnitude binary, express the magnitude as an n 1 bit binary number. Then assign the appropriate sign bit as the most signi cant bit. To convert a sign-magnitude encoding to decimal, remove the most signi cant bit, and then convert the remaining n 1 bits to decimal. Set the sign according to the value of the most signi cant bit. With this system all non-negative integers are represented by their n-bit base-2 encoding. As a result all numbers from 0 to 2n 1 1 will have base-2 representations that begin with 0.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents