Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 4 Number Systems Lecturer: Sumaira Hussain.

Similar presentations


Presentation on theme: "Lecture 4 Number Systems Lecturer: Sumaira Hussain."— Presentation transcript:

1 Lecture 4 Number Systems Lecturer: Sumaira Hussain

2 von Neumann Model Every computer today is based on the von Neumann Model. It is based on 3 ideas: 1.Four subsystems 2.Stored Program Concept 3.Sequential Execution of Instructions

3 Four subsystems:Four subsystems: 1. Memory 1. Memory – the storage area of programs and data. 2.ALU 2.ALU – arithmetic/logic operations take place 3.Control Unit 3.Control Unit – control Memory, ALU, and I/O 4.I/O 4.I/O – accept input data/send output data

4 Input/Output Subsystem secondary storage The definition is very broad; it includes the secondary storage devices. Disk Disk – stores data and programs for processing

5 Stored Program Concept The von Neumann model states that the program must be stored in memory. The memory of modern computers hosts both – a program – its corresponding data

6 Sequential Execution of Instructions A program is made of a finite number of instructions. The control unit – fetches one instruction from memory – interpret it – execute it The instructions are executed one after another.

7 Storing Data Store data in the form of an electrical signal, specially its presence or absence. This implies that a computer can store data in one of two states. Binary number system

8 Data organization Although data should be stored only in one form (a binary pattern) inside a computer, data outside a computer can take many forms. Data come in different forms: – Numbers – Text – Images – Audio – Video

9 Requirements of von Neumann model 1.The programs must be stored in memory. 2.The programs must be a sequence of instructions.

10 Number System "A set of values used to represent different quantities is known as Number System". The digital computer represents all kinds of data and information in binary numbers. It includes audio, graphics, video, text and numbers. The total number of digits used in a number system is called its base or radix. The base is written after the number as subscript such as 512 10.

11 Types of Number System Decimal number system Binary number system Octal number system Hexadecimal number system

12 Decimal Number System The Decimal Number System consists of ten digits from 0 to 9. These digits can be used to represent any numeric value. The base of decimal number system is 10. The decimal number system is used in general.

13 Binary Number System Digital computer represents all kinds of data and information in the binary system. Binary Number System consists of two digits 0 and 1. Its base is 2. Each digit or bit in binary number system can be 0 or 1

14 Octal Number System Octal Number System consists of eight digits from 0 to 7. The base of octal system is 8. Octal number system is used as a shorthand representation of long binary numbers.

15 Hexadecimal Number System The Hexadecimal Number System consists of 16 digits from 0 to 9 and A to F. The alphabets A to F represent decimal numbers from 10 to 15. The base of this number system is 16. This number system provides shortcut method to represent long binary numbers.

16 CONVERTING NUMBERS FROM ONE BASE INTO ANOTHER Binary to Decimal Multiplication by the power of 2 Decimal to Binary Repeated division by 2

17 Decimal to Octal Division by 8 and storing remainder Octal to Decimal Multiplication by the power of 8 Binary to Octal first group into set of three digits from right side and then convert into decimal Octal to Binary look up each octal digit to obtain the equivalent group of three binary digits Octal =345 Binary =011100101= 011100101 binary CONVERTING NUMBERS FROM ONE BASE INTO ANOTHER

18 Decimal to Hexadecimal Division by 16 and storing remainder Hexadecimal to Decimal Multiplication by the power of 16 Binary to Hexadecimal first group into set of four digits from right side. into and then convert into decimal Hexadecimal to Binary look up each hexadecimal digit to obtain the equivalent group of four binary digits Hexadecimal =A2DE Binary =1010001011011110 CONVERTING NUMBERS FROM ONE BASE INTO ANOTHER


Download ppt "Lecture 4 Number Systems Lecturer: Sumaira Hussain."

Similar presentations


Ads by Google