Loading in 5 sec....

CS170 Computer Organization and Architecture IPowerPoint Presentation

CS170 Computer Organization and Architecture I

- 82 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about 'Lecture 1: 8' - adolph

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

CS170 Computer Organization and Architecture I

Ayman Abdel-Hamid

Department of Computer Science

Old Dominion University

Lecture 1: 8/27/2002

CS170 Fall 2002

Outline

- What is a computer?
- An overview of number systems
- Decimal
- Binary
- Octal
- Hexadecimal

CS170 Fall 2002

Output

A Computer

Processor

Tapes

Keyboard

Mouse

scanner

Display

Paper

Memory

Five classic components of a computer:

Input, Output, Memory, Data path, Control

Processor

CS170 Fall 2002

Computers are built on two key principles

- Both instructions and data are represented by numbers
- Instructions and data are stored in memory and are read and written as numbers

All computers use the binary number system (base 2)

(basic nature of electronic circuits ON/OFF, current flow/does not flow)

Machine alphabet has two letters “0”, “1”

Each letter is a binary digit “bit”. Byte is 8 bits

CS170 Fall 2002

Number Systems

- Numbers can be represented in any base (humans use base 10)
- Symbols for a number system of base B are 0, 1, 2, …, B –1
- decimal (base 10) 0, 1, 2, .., 9 binary (base 2) 0, 1
- notation “numberB” (375 in decimal is written 37510, 1011 in binary is written 10112)
- Value of ith digit d is “d * Bi” where i starts from 0 and increases from right to left

2 1 0 i positional notation

3 7 5 d

5 * 100 = 5

7 * 101 = 70

3 * 102 = 300

Three hundred and seventy five

CS170 Fall 2002

Conversion from binary to decimal

Convert 10112 to decimal

3 2 1 0 i

1 0 1 1 d

= (1 * 20) + (1 * 21) + (0 * 22) + (1 *23)

= 1 + 2 + 0 + 8

= 1110

This process can be used for conversion from any number system to decimal (TRY convert 1238 to decimal)

CS170 Fall 2002

Conversion from decimal to binary

Step 1: divide value by 2 and record remainder

Step 2: as long as quotient not zero, continue to divide the newest quotient by 2 and record the remainder

Step 3: when obtain a zero as quotient, binary representation consists of remainders listed from right to left in order

Convert 1310 to binary

Operation Quotient remainder

13 by 2 6 1

6 by 2 3 0

3 by 2 1 1

1 by 2 0 1

1310 = 11012

CS170 Fall 2002

Conversion from decimal to binary

Previous approach can be used to convert from decimal to any number system

Convert 1310 to octal (octal is base 8)

Operation Quotient remainder

13 by 8 1 5

1 by 8 0 1

1310 = 158

158= (5 * 80) + (1 * 81) = 1310

CS170 Fall 2002

Other Number Systems

- Octal (base 8)
- Symbols (0, 1, 2, 3, 4, 5, 6, 7)

- Working with too long binary numbers is a problem
- Hexadecimal (base 16)
- Symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F)

- Byte = 8 bits = 2 hex digits ( 1 hex digit is 4 bits)

CS170 Fall 2002

11

0100

1110

416

Conversion from binary to hexConvert 11010011102 to hex

Divide binary number into 4 bits groups from right to left

316

E16

34E16

CS170 Fall 2002

0 0000 0

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

10 1010 A

11 1011 B

12 1100 C

13 1101 D

14 1110 E

15 1111 F

20 = 1 27 = 128

21 = 2 28 = 256

22 = 4 29 = 512

23 = 8 210 = 1024

24 = 16 211 = 2048

25 = 32 212 = 4096

26 = 64 213 = 8190

Kilo 210 Tera 240

Mega 220 Peta 250

Giga 230

CS170 Fall 2002

Download Presentation

Connecting to Server..