02.10.2019 Views

UploadFile_6417

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Representation of Numbers 261<br />

Two’s-complement format Once again, the positive numbers have<br />

the same representation. Negative numbers are obtained by first complementing<br />

the magnitude and then modulo-2 adding one to the last bit<br />

or the least-significant bit (LSB). Stated differently, two’s-complement is<br />

formed by subtracting the magnitude of the number from 2. Thus<br />

⎧<br />

⎨<br />

0x<br />

ˆx = 1 x 2 ···x B if x ≥ 0<br />

⎩2 −|x| = 1¯x 1¯x 2 ···¯x B ⊕ 000 ···1=1y 1 y 2 ···y B if x

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

Saved successfully!

Ooh no, something went wrong!