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

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

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

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

View Full DocumentRight Arrow Icon
CC2202 2 Last Week and This Week We learnt Intel Processor instructions Bus Structure Timing Diagram We will learn Number System
Background 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
Background image of page 3

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

View Full DocumentRight 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
Background 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
Background image of page 5

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

View Full DocumentRight 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
Background 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
Background image of page 7

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

View Full DocumentRight Arrow Icon
CC2202 8 Decimal to Binary Conversion (integer)
Background image of page 8
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. may not become 0.
Background image of page 9

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

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

This note was uploaded on 08/18/2011 for the course COMP 3868 taught by Professor Keithchan during the Summer '97 term at Hong Kong Polytechnic University.

Page1 / 38

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

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

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