12.07.2015 Views

Lecture 7 - Webstaff.kmutt.ac.th - kmutt

Lecture 7 - Webstaff.kmutt.ac.th - kmutt

Lecture 7 - Webstaff.kmutt.ac.th - kmutt

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SummarySigned Binary NumbersNegative numbers are written as <strong>th</strong>e 2’s complement of <strong>th</strong>e corresponding positive number.The negative number −58 is written as:−58 = 11000110 (complement form)Sign bitMagnitude bitsAn easy way to read a signed number <strong>th</strong>at uses <strong>th</strong>is notation is toassign <strong>th</strong>e sign bit a column weight of −128 (for an 8-bit number).Then add <strong>th</strong>e column weights for <strong>th</strong>e 1’s.Assuming <strong>th</strong>at <strong>th</strong>e sign bit = −128, show <strong>th</strong>at 11000110 = −58as a 2’s complement signed number:Column weights: −128 64 32 16 8 4 2 1.1 1 0 0 0 1 1 0−128 +64 +4 +2 = −58Floyd, Digital Fundamentals, 10 <strong>th</strong> ed© 2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights Reserved

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!