lab2 - COP 3502 LAB # 2 Topics Review of Decimal: We have...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: COP 3502 LAB # 2 Topics Review of Decimal: We have 10 digits[0..9] and the digits position in a number determines its overall value. For example, the number 3714 means 3*1000 + 7*100 + 1*10 +4*1 or we can also write it as 3*10 3 + 7*10 2 + 1*10 1 + 4*10 (where 10 =1). Binary to Decimal: The binary number system means that we have two digits[0,1] and that the digits position also determines its value, but as a power of 2 instead of as a power of 10. The number 1101 in binary is 1*2 3 + 1*2 2 + 0*2 1 +1*2 or 8 + 4 + 0 + 1 =13. The number 001010 in binary is We can convert any binary number into decimal by adding the values of each of its digits just as we did in the example. Dec to Binary: Two methods to show this: First, subtraction of the highest powers of two, keeping track of which you could and couldnt subtract. For example 94: 94 is larger than 64 and is less than 128, 1 *2 6 so we do 94-64=30. (1) You cant subtract the next power, 32 0 *2 5 So the 32s position is a 0 (0)...
View Full Document

This document was uploaded on 06/12/2011.

Page1 / 3

lab2 - COP 3502 LAB # 2 Topics Review of Decimal: We have...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online