Skip to Content
Interfacing PIC Microcontrollers
book

Interfacing PIC Microcontrollers

by Martin P. Bates
April 2011
Intermediate to advanced
312 pages
9h 32m
English
Newnes
Content preview from Interfacing PIC Microcontrollers
Conversion to the 2s complement negative form from the positive number is
achieved by the inverse process:
SUBTRACT 1, THEN INVERT ALL BITS
For example:
Subtract 1 Invert bits
1  0000 0001 0000 0000 1111 1111  FF  001
63  0011 1111 0011 1110 1100 0001  C1  063
128  1000 0000 0111 1111 1000 0000  80  128
255  1111 1111 1111 1110 0000 0001  01  255
In this way, 2s complement form allows the usual arithmetic operations to be
applied to negative binary numbers with the correct result. 255 is the limit
of the 8-bit 2s complement range, but more bits can be used if necessary.
SUMMARY 5
Digital information is stored ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Interfacing PIC Microcontrollers, 2nd Edition

Interfacing PIC Microcontrollers, 2nd Edition

Martin P. Bates

Publisher Resources

ISBN: 9780750680288