Lec4_Data_Show_1011 - Lecture 4 Number System CC2202 1 Last...

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

View Full Document Right Arrow Icon
CC2202 1 Lecture 4 Number System
Image of page 1

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

View Full Document Right Arrow Icon
CC2202 2 Last Week and This Week We learnt Intel Processor instructions Bus Structure Timing Diagram We will learn Number System
Image of page 2
CC2202 3 Number System We know now that a digital computer stores and manipulates discrete elements of information and all information in the computer is represented in binary form operands used for calculations may be expressed in the binary number system or in the decimal system by means of a binary code the letters of the alphabet are also converted into a binary code In this lecture, we study the binary number system and binary arithmetic
Image of page 3

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

View Full Document Right Arrow Icon
CC2202 4 Number System Human convention Decimal systems (base 10 or radix 10) 10 separate symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 A decimal number is represented as a n a n-1 ... a 3 a 2 a 1 a 0 . a -1 a -2 a -3 ... a -m The value represented by a digit is implied by its position E.g., 724.5 is interpreted to represent 7 hundreds plus 2 tens plus 4 units plus 5 tenths. The value of the number is computed as follows: 724.5 = 7 × 10 2 + 2 × 10 1 + 4 × 10 0 + 5 × 10 -1 In general, a number in base -r system has coefficients multiplied by power of r: a n r n + a n-1 r n-1 + ... + a 1 r 1 + a 0 r 0 + a -1 r -1 + ... + a -m r -m If a x is equal to 0, it does not contribute to the sum
Image of page 4
CC2202 5 Number System - Binary Computer convention -- Binary systems (Base 2) Two symbols: 0, 1 Binary representation: 325 D = 101000101 B Binary addition: basic rules: 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 with carry Binary subtraction: basic rules: 0 - 0 = 0 1 - 0 = 1 1 - 1 = 0 0 - 1 = 1 with borrow Binary multiplication and division can be carried out in a manner analogous to that used for decimal numbers but will be considered later
Image of page 5

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

View Full Document Right Arrow Icon
CC2202 6 Number System: Value box conversion (Integer) Bit Pattern 1 0 0 1 1 1 0 1 Position 7 6 5 4 3 2 1 0 Contributes +2 7 +2 4 +2 3 +2 2 +2 0 The decimal equivalent value of the number 10011101 2 is 2 7 + 2 4 + 2 3 + 2 2 + 2 0 = 128 +16 + 8 + 4 + 1 = 157 10
Image of page 6
CC2202 7 Number System: Value box conversion (Fractions) Given the binary number: 10011.101 The value of the number is 2 4 + 2 1 + 2 0 + 2 -1 + 2 -3 = 16 + 2 + 1 + 1/2 + 1/8 = 19 5/8 Bit Pattern 1 0 0 1 1 1 0 1 Position 7 6 5 4 3 2 1 0 Contributes +2 4 +2 1 +2 0 +2 -1 +2 -3
Image of page 7

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

View Full Document Right Arrow Icon
CC2202 8 Decimal to Binary Conversion (integer)
Image of page 8
CC2202 9 Decimal to Binary Conversion (Fractional Numbers) From decimal (F) to binary (0 . R 0 R 1 R 2 …) Consider 0 < F < 1 F x 2 = R 0 + F 1 (R 0 is 0 or 1) F 1 x 2 = R 1 + F 2 (R 1 is 0 or 1) F m-1 x 2 = R m-1 + F m+1 (R m-1 is 0 or 1) The process may run forever, where F The process may run forever, where F m+1 m+1 may not become 0.
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
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