8.28 Binary & Representation Of Numbers

6714 binaryscientificnotation

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sentation of ­5? Given a binary number, how can we quickly find out what number it represents? 2’s Complement 2’s complement ­1 ­2 ­3 ­4 ­5 0 1111 0000 1110 1 0001 0010 2 1101 0011 1100 0100 1011 0101 ­6 1010 1001 ­7 1000 ­8 0110 0111 6 3 4 5 6­4 = 6 + ­4 = 0110 + 1100 = 10010 = 0010 (ignoring overflow bit) 7 java int: 32 bits: 231­1 = 2,147,483,647 java long: 64 bits: 9,223,372,036,854,775,807 Real Numbers Real Numbers 16 8 4 2 1 1/2 1/4 1/8 1/16 2 1 1 1/2 1/4 1/8 1/16 0 . 0 1 0 1 = 2 + 1/4 + 1/16 = 2 + .25 + .0625...
View Full Document

Ask a homework question - tutors are online