Computer Architecture and Number Systems

Slides:



Advertisements
Similar presentations
INTRODUCTION OF COMPUTER
Advertisements

Using Computers CS French Chapter 1.
Computer Hardware.
0 What is a computer?  Simply put, a computer is a sophisticated electronic calculating machine that:  Accepts input information,  Processes the information.
CMSC 104, Version 9/01 1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The.
BLOCK DIAGRAM OF COMPUTER
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
Chapter 3 Computer Hard ware
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Introduction to the Computer System. What is a computer ? A computer is an electronic device that can accept data and instruction, process them or store.
Intro to Computers Computer Apps 1.
Machine Architecture CMSC 104, Section 4 Richard Chang 1.
CMSC104 Lecture 2 Remember to report to the lab on Wednesday.
Components of a Computer Prepared by: Mrs. McCallum-Rodney.
Advanced Computer Architecture 0 Lecture # 1 Introduction by Husnain Sherazi.
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
COMPUTER ARCHITECTURE. Recommended Text 1Computer Organization and Architecture by William Stallings 2Structured Computer Organisation Andrew S. Tanenbaum.
Intro to Computers Computer Applications. What is a Computer? Initially the term computer referred to an individual whose job it was to perform mathematical.
Computer Architecture
Aug CMSC 104, LECT-021 Machine Architecture Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY of NORTH CAROLINA.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Machine Architecture and Number Systems
Machine Architecture CMSC 104, Section 4 Richard Chang 1.
CMSC Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Binary Decimal Hexadecimal
CMSC 1041 Machine Architecture An Introduction to Computer Components.
Hardware Information Created by Nasih 1. Hardware  The physical components of a computer system, including any peripheral equipment such as printers,
Introduction To Computers
 A computer is an electronic device that receives data (input), processes data, stores data, and produces a result (output).  It performs only three.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
24/06/20161 Hardware Processor components & ROM. 224/06/2016 Learning Objectives Describe the function and purpose of the control unit, memory unit and.
Introduction to Programming. Key terms  CPU  I/O Devices  Main memory  Secondary memory  Operating system  User interface  Application  GUI 
COMPUTER HARDWARE & SOFTWARE INTRODUCTION TO LIBRARY & INFORMATION SCIENCES (5501) WORKSHOP SPRING 2013 By: Huma Malik Librarian, Preston University, Islamabad.
UMBC CMSC 104 – Section 01, Fall UMBC CMSC 104, Section 01 - Fall 2016  Nothing. Enjoy your weekend! 2.
Computer Graphics HARDWARE. Computers  Computers are automatic, electronic machines that –accept data & instructions from a user (INPUT) –store the data.
Computer Systems Nat 4/5 Computing Science Computer Structure:
BASIC PROGRAMMING C SCP1103 (02)
Chapter 1: An Overview of Computers and Programming Languages
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
BASIC PROGRAMMING C SCP1103 (02)
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
Chapter 7.2 Computer Architecture
Introduction to Computer Architecture
Computer Architecture
Course Name: Computer Application Topic: Central Processing Unit (CPU)
IB Computer Science Topic 2.1.1
Introduction to Computers
Machine Architecture and Number Systems
PARTS OF THE COMPUTER squires productions.
Introduction to Computers
Introduction to Computers
Machine Architecture and Number Systems
Overview of Computer Architecture and Organization
Logical Computer System
Machine Architecture and Number Systems
Machine Architecture and Number Systems
Machine Architecture and Number Systems
Machine Architecture and Number Systems
Introduction to Computer Architecture
Lecture 4 Number Systems. von Neumann Model Every computer today is based on the von Neumann Model. It is based on 3 ideas: 1.Four subsystems 2.Stored.
Chapter 5 Computer Organization
COMPUTER FUNDAMENTALS i
Notes from Last Class Office Hours: GL Accounts?
Computer components is a programmable machine that receives input, stores and manipulates data, and provides output in a useful format. Computer The computer.
Machine Architecture and Number Systems
4. Computer system.
Presentation transcript:

Computer Architecture and Number Systems Topics What is Computer? Major Computer Components Computer Components Interconnection Data Representation Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Binary to Decimal, Decimal to Binary The Hexadecimal Number System Converting from Hexadecimal to Decimal, Decimal to Hexadecimal

What is Computer? A data processing machine capable of performing computations and making logical decisions very fast. Consists of hardware such as keyboard, screen, mouse, disks, memory, CD-ROM, and processing units. A program (software) is a set of instructions written in a computer language that runs on a computer.

Major Computer Components Memory Unit (Main Memory, Secondary Storage Unit) Arithmetic and Logic Unit (ALU), Central Processing Unit (CPU) Input/Output (I/O) Unit

Memory Unit Memory unit stores information such as computer programs, data, or documents. Two types of memory devices: Primary Storage or Main Memory Secondary Storage

Memory Unit (con’t) Main memory is fast and expensive . Stores frequently accessed information such as programs and data during their execution. Is volatile storage. That is, if power is lost, the information in main memory is lost. Secondary storage is slower and cheaper. Disks (floppy, hard, removable), Tapes, CDs, DVDs. Is non-volatile, that is persistent (permanent) storage.

Memory Unit (con’t) Main memory consists of a collections of storage locations. Data are read from or written to memory in cells. A cell can be 8 – 64 bits. Address is used to uniquely identify a cell location. Cells may be grouped into words. E.g., four 8-bit cells forms one word.

Memory Unit (con’t) Memory Access Methods Sequential access memory Read memory address one after another, e.g. tape. Random-access memory (RAM) Any location can be read by specifying its address, e.g. main memory, disks, CDs, DVDs.

Input/Output (I/O) Unit Input/Output Unit Input unit accepts input data and programs from an input device. Output unit sends the results of processing (output) to an output device. More generally, these devices are known as peripheral devices. Input device - keyboard, mouse, scanner Output device - monitor, printer I/O device - disk drive (floppy, hard, removable), CD or DVD drive

ALU, CPU ALU performs calculations (such as addition, subtraction, multiplication, division) and logical operations (e.g. comparing two numbers). CPU is the “brain” of the computer. Controls operations of other components, memory, ALU, I/O. Tells input unit when info is ready to be read into the memory unit. Tells output unit when to send info from the memory unit to an output device.

Computer Components Interconnection CPU and memory are connected by a bus. Connecting I/O devices I/O devices are slower than CPU/memory. Can’t connect directly to Bus. Need an I/O controller or interface to handle the differences in speed between the I/O device and the bus. A bus is a group of parallel wires that carry control signals and data between CPU and memory.

Computer Components Interconnection Three types of Bus - Data Bus Address Bus Control Bus Data bus consists of many wires. Each wire carries 1 bit at a time. The # of wires (bits) needed = size of a word. If the word is 32 bits in a computer, then we need 32-bit data bus.

Computer Components Interconnection Address bus allows access to a particular word in a memory. The number of wires = log2(total number of memory words). If the memory has 2n words, address bus needs to carry n bits at a time. Control bus carries communication signals between CPU and memory. The number of bits used = log2(total number of control commands).

Data Representation Data types: Text Number Image Audio Video

Bits, Bytes, and Words A bit is a single binary digit (a 1 or 0). A byte is 8 bits A word is 32 bits (that is, 4 bytes) Long word = 8 bytes = 64 bits Quad word = 16 bytes = 128 bits Programming languages use these standard number of bits when organizing data storage and access. What do you call 4 bits? (hint: it is a small byte)

Number Systems The data in memory is represented in terms of 1’s and 0’s. Therefore, thinking about how information is stored in RAM requires knowledge of the binary (base 2) number system. Let’s review the decimal (base 10) number system first.

The Decimal Number System The decimal number system is a positional number system. Example: 1 2 6 5 5 X 100 = 5 103 102 101 100 6 X 101 = 60 2 X 102 = 200 1 X 103 = 1000

The Decimal Number System (con’t) The decimal number system is also known as base 10. The values of the positions are calculated by taking 10 raised to some power. Why is the base 10 for decimal numbers? Because we use 10 digits, the digits 0 through 9.

The Binary Number System The binary number system is also known as base 2. The values of the positions are calculated by taking 2 to some power. Why is the base 2 for binary numbers? Because we use 2 digits, the digits 0 and 1.

The Binary Number System (con’t) The binary number system is also a positional numbering system. Instead of using ten digits, 0 - 9, the binary system uses only two digits, 0 and 1. Example of a binary number and the values of the positions: 1 0 0 1 1 0 1 26 25 24 23 22 21 20

Converting from Binary to Decimal 1 0 0 1 0 0 1 1 X 20 = 1 26 25 24 23 22 21 20 0 X 21 = 0 0 X 22 = 0 20 = 1 24 = 16 1 X 23 = 8 21 = 2 25 = 32 0 X 24 = 0 22 = 4 26 = 64 0 X 25 = 0 23 = 8 1 X 26 = 64 7310

Converting from Binary to Decimal (con’t) Practice conversions: Binary Decimal 101 1101 101101

Converting From Decimal to Binary (con’t) Perform successive divisions by 2, placing the remainder (0 or 1) in each of the positions from right to left. Continue until the quotient is zero. Example: 4410 44 / 2 = 22 rem = 0 22 / 2 = 11 rem = 0 11 / 2 = 5 rem = 1 5 / 2 = 2 rem = 1 2 / 2 = 1 rem = 0 1 / 2 = 0 rem = 1 Done answer = 1 0 1 1 0 0 2

Converting From Decimal to Binary (con’t) Practice conversions: Decimal Binary 59 82 175

Working with Large Numbers 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 = ? Humans don’t work well with binary numbers; there are too many digits to deal with. Memory addresses and other data can be quite large. Therefore, we sometimes use the hexadecimal number system.

The Hexadecimal Number System The hexadecimal (hex) number system is also known as base 16. The values of the positions are calculated by taking 16 to some power. Why is the base 16 for hexadecimal numbers ? Because we use 16 symbols, the digits 0 and 1 and the letters A through F.

The Hexadecimal Number System (con’t) Example of a hexadecimal number and the values of the positions: 3 C 8 B 0 5 1 166 165 164 163 162 161 160

The Hexadecimal Number System (con’t) Binary Decimal Hexadecimal Binary Decimal Hexadecimal 0 0 0 1010 10 A 1 1 1 1011 11 B 10 2 2 1100 12 C 11 3 3 1101 13 D 100 4 4 1110 14 E 101 5 5 1111 15 F 110 6 6 111 7 7 1000 8 8 1001 9 9

Converting From Hexadecimal to Decimal Example: Convert 1A5F16 to decimal. 1 A 5 F 163 162 161 160 4096 256 16 1 Recall: A16 = 1010 and F16 = 1510. = 1 x 4096 + A x 256 + 5 x 16 + F x 1 = 1 x 4096 + 10 x 256 + 5 x 16 + 15 x 1 = 4096 + 2560 + 80 + 15 = 675110

Converting From Decimal to Hexadeciaml Perform successive divisions by 16, placing the remainder (0-9, A-F) in each of the positions from right to left. Continue until the quotient is zero. Example: Convert 14310 to hex. 143 / 16 = 8 rem = 1510 = F16 8 / 16 = 0 rem = 8 Done answer = 8F16 To Check: 8 x 16 + 15 = 128 + 15 = 14310

Example of Equivalent Numbers Binary: 1 0 1 0 0 0 0 1 0 1 0 0 1 1 12 Decimal: 2064710 Hexadecimal: 50A716 Notice that the number of digits needed is smaller as the base increases.

Next Class Operating System and Using Linux. Homework #1 due beginning of class on September 9.