Skip to Main Content
Java 6 Illuminated: An Active Learning Approach, 2nd Edition
book

Java 6 Illuminated: An Active Learning Approach, 2nd Edition

by Julie Anderson, Herve J. Franceschi
February 2008
Intermediate to advanced content levelIntermediate to advanced
1288 pages
39h 39m
English
Jones & Bartlett Learning
Content preview from Java 6 Illuminated: An Active Learning Approach, 2nd Edition
D
APPENDIX
Representing Negative Integers
The industry standard method for representing negative integers is called
two’s complement. Here is how it works:
For an integer represented using 16 bits, the leftmost bit is reserved for the
sign bit. If the sign bit is 0, then the integer is positive; if the sign bit is 1,
then the integer is negative.
For example, let’s consider two numbers, one positive and one negative.
0000 0101 0111 1001 is a positive integer, which we call a.
1111 1111 1101 1010 is a negative integer, which we will call b.
Using the methodology presented in Chapter 1 for converting a binary
number to a decimal number, we can convert the ...
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

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Kathy Walrath, Mary Campione, Alison Huml, Sharon Zakhour
Java Illuminated, 4th Edition

Java Illuminated, 4th Edition

Julie Anderson, Hervé J. Franceschi

Publisher Resources

ISBN: 9780763749637