ch03 - Computer System Architecture Dept. of Info. Of...

Info iconThis preview shows pages 1–4. 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

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: Computer System Architecture Dept. of Info. Of Computer Chap. 3 Data Representation Chap. 3 Data Representation 3-1 3-1 Data Types Binary information is stored in memory or processor registers Registers contain either data or control information Data are numbers and other binary-coded information Control information is a bit or a group of bits used to specify the sequence of command signals Data types found in the registers of digital computers Numbers used in arithmetic computations Letters of the alphabet used in data processing Other discrete symbols used for specific purpose o& Number o Letter HA , o ) gray code, error detection code, Number Systems Base or Radix r system : uses distinct symbols for r digits Most common number system :Decimal, Binary, Octal, exadecimal Positional-value(weight) System : r 2 r 1 r .r-1 r-2 r-3 Multiply each digit by an integer power of r and then form he sum of all weighted digits Chap. 3 Data Representation Computer System Architecture Dept. of Info. Of Computer Chap. 3 Data Representation Chap. 3 Data Representation 3-2 Decimal System/Base-10 System Composed of 10 symbols or numerals(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0) Binary System/Base-2 System Composed of 10 symbols or numerals(0, 1) Bit = Binary digit Hexadecimal System/Base-16 System : Tab. 3-2 Composed of 16 symbols or numerals(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) Binary-to-Decimal Conversions 1011.101 2 = (1 x 2 3 ) + (0 x 2 2 )+ (1 x 2 1 ) + (1 x 2 o ) + (1 x 2-1 ) + (0 x 2-2 ) + (1 x 2-3 ) = 8 10 + 0 + 2 10 + 1 10 + 0.5 10 + 0 + 0.125 10 = 11.625 10 Decimal-to-Binary Conversions Repeated division(See p. 69, Fig. 3-1 ) 37 / 2 = 18 remainder 1 (binary number will end with 1) : LSB 18 / 2 = 9 remainder 0 9 / 2 = 4 remainder 1 4 / 2 = 2 remainder 0 2 / 2 = 1 remainder 0 1 / 2 = 0 remainder 1 (binary number will start with 1) : MSB Read the result upward to give an answer of 37 10 = 100101 2 * 0.375 x 2 = 0.750 integer 0 MSB 0.750 x 2 = 1.500 integer 1 . 0.500 x 2 = 1.000 integer 1 LSB Read the result downward .375 10 = .011 2 Computer System Architecture Dept. of Info. Of Computer Chap. 3 Data Representation Chap. 3 Data Representation 3-3 Hex-to-Decimal Conversion 2AF 16 = (2 x 16 2 ) + (10 x 16 1 ) + (15 x 16 o ) = 512 10 + 160 10 + 15 10 = 687 10 Decimal-to-Hex Conversion 423 10 / 16 = 26 remainder 7 (Hex number will end with 7) : LSB 26 10 / 16 = 1 remainder 10 1 10 / 16 = 0 remainder 1 (Hex number will start with 1) : MSB Read the result upward to give an answer of 423 10 = 1A7 16 Hex-to-Binary Conversion 9F2 16 = 9 F 2 = 1001 1111 0010 = 100111110010 2 Table 3-2 Hex Binary Decimal 0000 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 A 1010 10 B 1011 11 C 1100 12 D 1101 13 E 1110 14 F 1111 15 Binary-to-Hex Conversion 1 1 1 0 1 0 0 1 1 0 2 = 0 0 0 0 1 1 1 0 1 0 0 1 1 0 3 A 6 = 3A6 16 Computer System Architecture...
View Full Document

This note was uploaded on 03/21/2010 for the course CS 145 taught by Professor Markjan during the Spring '10 term at Abilene Christian University.

Page1 / 14

ch03 - Computer System Architecture Dept. of Info. Of...

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

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