Computer Hardware & Software - Session 3 pps

45 232 0
Computer Hardware & Software - Session 3 pps

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Data Representation in Computers Session Data Representation in Computers/Session / of 45 Session Objectives s s s s s Describe what a Number system is Explain the decimal, octal and hexadecimal number systems Convert a number from one number system to another Practice binary arithmetic List the various standard codes used to represent the unit of information – ASCII – EBCDIC Data Representation in Computers/Session / of 45 Session Objectives (Contd.) s s s s s Explain Data Representation Explain Data Storage Explain Packed Decimal Binary Arithmetic Calculation Explain CPU and its speed Data Representation in Computers/Session / of 45 Number systems s The additive approach - Number earlier consisted of symbols e.g Roman number system - I for 1, II for 2, III for etc s Positional numbering - Symbols represent different values depending on the position they occupy e.g the Decimal system Data Representation in Computers/Session / of 45 Decimal Number System s s s s In the decimal number system the successive position to the left of the decimal point represent units, tens, hundreds, thousands etc (3 * 100) + (6*10) + (5*1) = 365 The position of the number affects its value (6*10) These kind of number systems therefore are called positional number system Base Position number Data Representation in Computers/Session / of 45 Decimal Number System (Contd.) of each digit in the s The value number system is determined by: a) The digit itself b) The position of the digit in the number c) The base/radix of the system Data Representation in Computers/Session / of 45 Binary Number System s s s s The binary number system has a base of two and symbols used are and In this number system, as we move to the left, the value of the digit will be two times greater than its predecessor because the base is two Thus the value of the places are :   64  32  16     0001111001010111 Least Significant bit Binary Number Most Significant bit Data Representation in Computers/Session / of 45 Octal number systems Binary s Uses a base of Values increase s from right to left 1, 8, 64, 512 s 000 001 010 011 100 101 110 111 Octal Data Representation in Computers/Session / of 45 Octal Number System s s The octal system has the base of The value increase from right to left as 1, 8, 64, 512, 4096 The decimal value of an octal number 1204 can be computed as : 1204 = (1 * 512) + (2 * 64) + (0 * 8) + (4 * 1) = 512 + 128 + + = 644 Data Representation in Computers/Session / of 45 Octal Number System  To convert a number from binary to octal and vice versa, the following table must be kept in mind: Binary 0000 0011 010 011 100 101 110 111 Octal Data Representation in Computers/Session / 10 of 45 Complementary Subtraction (Contd.) To find the complement of a binary number invert all the bits e.g Number 10001101 00101010 Complement 01110010 11010101 Data Representation in Computers/Session / 31 of 45 Complementary Subtraction (Contd.) Example of subtraction : e.g.1 1010101 - 1001100 Step Find the complement of 1001100 It is 0110011 Data Representation in Computers/Session / 32 of 45 Complementary Subtraction (Contd.) Step Add the number you are subtracting from carry 1110111 1010101 + 0110011 0001000 Since there is a carry of 1, Add the carry 0001000 + _ 0001001 Data Representation in Computers/Session / 33 of 45 Complementary Subtraction (Contd.) e.g.2 101100 - 11100101 Step Complement of 11100101 is 00011010 Step Carry 0111 00101100 +00011010 01000110 Step Since there is no carry we re-complement the result and add a negative sign Thus the answer Data Representation in Computers/Session / 34 of 45 is -10111001 Multiplication Rules for Multiplication: 0x0=0 0x1=0 1x0=0 1x1=1 E.g 10101 * 11001 10101 x11001 10101 00000 00000 10101 10101 1000001101 Data Representation in Computers/Session / 35 of 45 Division Start from the left of the dividend Perform subtraction i.e divisor should be subtracted from the dividend a) if subtraction is possible put in the quotient and subtract the divisor from digits of the dividend else put in the quotient b) bring down the next digit to the right of the remainder Do step till no more digits remain in the dividend Data Representation in Computers/Session / 36 of 45 Division The complete table for binary division is: 0/1 = 1/1 = For example: 100001 / 110 Then, 0101 (Quotient) 110100001 (Dividend) (Divisor)110 - Step 1000 - Step 2b 110 - Step 2a 100 - Step 2b 110 - Step 2a 1001 - Step 2b 110 - Step 2a 11 (Remainder) Data Representation in Computers/Session / 37 of 45 Unit of Information sMost computers use a coded version of true binary numbers to represent letters, special symbols, decimal numbers etc s digits are required to uniquely represent all 128 characters s Standardised coding to enable transfer of data between computers Data Representation in Computers/Session / 38 of 45 ASCII sCommon standard is the American Standard Code for Information Interchange (ASCII) sASCII uses bits per character possible to provide 128 different arrangements sSeparate Codes are used to convey end of file, end of page etc to the computer sThese codes are called non-printable control characters s ASCII code is used to represent data internally in personal computers Data Representation in Computers/Session / 39 of 45 EBCDI s Extended Binary Coded Decimal C Interchange Code ( EBCDIC) EBCDIC uses bits per character s Thus 256 characters can be represented using EBCDIC s The EBCDIC code is used in IBM mainframe models and other similar machines s Electronic Circuits available to transform characters from ASCII to EBCDIC and vice- versa s One can achieve the same results using a computer program s Data Representation in Computers/Session / 40 of 45 An insight into CPU s s s CPU also referred, as Microprocessor is actually the brain of a computer There are lot of chips on the motherboard and they all kind of look alike There are several companies who manufacture microprocessor chips : Advanced Micro Devices (AMD), Cyrix, Intel … Data Representation in Computers/Session / 41 of 45 CPU Properties The following are some of CPUs properties: Data Representation in Computers/Session / 42 of 45 What is meant by CPU speed? s s s s Every computer contains an internal clock that regulates the rate at which each instruction is executed The clock speed is measured in terms of MegaHertz (MHz) Mhz is equal to million cycles per second Hence a computer with 120 MHz speed means 120 million cycles per second It must be noted that a faster CPU with less hard disk space would result into a mediocre machine performance Data Representation in Computers/Session / 43 of 45 What if I increase the speed of clock? s s s Running a microprocessor much faster than the speed for which it has been tested and approved is also called as “Overclocking” In many cases you can force your CPU to run faster by setting the jumper on the motherboard But it may cause overheating Normally, running a CPU too fast will not damage the chip but the computer would not function properly Data Representation in Computers/Session / 44 of 45 What is meant by Word Size and how is it related with speed? s s s s Every computer has internal work areas, kind of little workbenches These workbenches are called as registers Registers are special high-speed storage area within the CPU All data must be represented in the register before it can be processed The number of the registers a CPU has and the size of each (in terms of bits) determine the speed and performance of the CPU The largest number a computer can process in one operation is determined by size of a word Data Representation in Computers/Session / 45 of 45 ... 1000 - Step 2b 110 - Step 2a 100 - Step 2b 110 - Step 2a 1001 - Step 2b 110 - Step 2a 11 (Remainder) Data Representation in Computers /Session / 37 of 45 Unit of Information sMost computers... of bits s Most computers have words that consist of or 16 bits s In large computers the number of bits per word could be 16 or 32 bits Data Representation in Computers /Session / 23 of 45 Data representation...

Ngày đăng: 29/07/2014, 08:20

Từ khóa liên quan

Mục lục

  • Data Representation in Computers

  • Session Objectives

  • Session Objectives (Contd.)

  • Number systems

  • Decimal Number System

  • Decimal Number System (Contd.)

  • Binary Number System

  • Octal number systems

  • Octal Number System

  • Slide 10

  • Hexadecimal Number Systems

  • Hex. Number Systems(Contd.)

  • Binary to Decimal Conversion

  • Decimal to Binary Conversion

  • Slide 15

  • Binary to Hexadecimal

  • Binary to Hexadecimal (Contd.)

  • Hexadecimal to Binary

  • Converting from Binary to Octal

  • Converting from Octal to Binary

Tài liệu cùng người dùng

Tài liệu liên quan