Dale - Computer Science Illuminated 67

Dale - Computer Science Illuminated 67 - 10 and subtract to...

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

View Full Document Right Arrow Icon
Binary Octal Decimal 000 001 010 011 100 101 110 111 1000 1001 1010 0 1 2 3 4 5 6 7 10 11 12 0 1 2 3 4 5 6 7 8 9 10 40 Chapter 2 Binary Values and Number Systems The subtraction facts that you learned in grade school were that 9 ± 1 is 8, 8 ± 1 is 7, and so on until you try to subtract a larger digit from a smaller one, such as 0 ± 1. To accomplish this, you have to “borrow one” from the next left digit of the number from which you are subtracting. More precisely, you borrow one power of the base. So in base 10, when you borrow, you borrow 10. The same logic applies to binary subtraction. Every time you borrow in a binary subtraction, you borrow 2. Here is an example with the borrowed values marked above. 1 02 / 2 borrow 111001 ± 110 110011 Once again, you can check the calculation by converting all values to base
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 10 and subtract to see if the answers correspond. Power of Two Number Systems Binary and octal numbers have a very special relationship to one another: Given a number in binary, you can read it off in octal and given a number in octal, you can read it off in binary. For example, take the octal number 754. If you replace each digit with the binary representation of that digit, you have 754 in binary. That is, 7 in octal is 111 in binary, 5 in octal is 101 in binary, 4 in octal is 100 in binary, so 754 in octal is 111101100 in binary. To facilitate this type of conversion, the table below shows counting in binary from 0 through 10 with their octal and decimal equivalents....
View Full Document

Ask a homework question - tutors are online