lab1 - LAB 1 Topics Review of Decimal We have 10 digits[0.9...

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

View Full Document Right Arrow Icon
LAB # 1 Topics Review of Decimal: We have 10 digits[0..9] and the digit’s 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^0 (where 10 ^0=1). Binary to Decimal: The binary number system means that we have two digits[0,1] and that the digit’s 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^0 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 couldn’t 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 can’t subtract the next power, 32 0 *2^5 So the 32’s position is a 0 (0) 30 is greater than the next power 16 1 *2^4 So we do 30-16= 14 (1)
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern