Samara University College of Engineering and Technology Computer Science

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 42

Samara University

College of Engineering and Technology


Computer Science
Microprocessor and Assembly Language Programming
(CoSc 3025)

Chapter 1
Introduction to the Microprocessor and
Computer
Outline

A Historical Background
The Microprocessor-Based Personal Computer System
Number Systems
Computer Data Formats
CHAPTER OBJECTIVES
Upon completion of this chapter, you will be able to:

1. Converse by using appropriate computer terminology such as bit, byte, data, real
memory system, protected mode memory system, Windows, DOS, I/O, and so forth.
2. Briefly detail the history of the computer and list applications performed by
computer systems.
3. Provide an overview of the various 80X86 and Pentium family members.
4. Draw the block diagram of a computer system and explain the purpose of each
block.
5. Describe the function of the microprocessor and detail its basic operation.
6. Define the contents of the memory system in the personal computer.
7. Convert between binary, decimal, and hexadecimal numbers.
8. Differentiate and represent numeric and alphabetic information as integers,
floating-point, BCD, and ASCII data.
1.1) A historical Background
• The mechanical age
– The idea of a computing system is not new—it has been
around long before modern electrical and electronic
devices were developed. The idea of calculating with a
machine dates to 500 BC when the Babylonians, the
ancestors of the present-day Iraqis, invented the abacus,
the first mechanical calculator.

– The abacus, was not improved until 1642, when


mathematician Blaise Pascal invented a calculator that
was constructed of gears and wheels
1.1) A historical Background…
The Electrical age
– The 1800s saw the advent of the electric motor (conceived
by Michael Faraday); with it came a multitude of motor-
driven adding machines
– In 1889, Herman Hollerith developed the punched card
for storing data. Like Babbage, he too apparently
borrowed the idea of a punched card from Jacquard. He
also developed a mechanical machine—driven by one of
the new electric motors—that counted, sorted, and
collated information stored on punched cards.
1.1) A historical Background…
The Electrical age
– In 1896, Hollerith formed a company called the
Tabulating Machine Company, which developed a line of
machines that used punched cards for tabulation. After a
number of mergers, the Tabulating Machine Company
was formed into the International Business Machines
Corporation, now referred to more commonly as IBM,
Inc. The punched cards used in early computer systems
are often called Hollerith cards, in honor of Herman
Hollerith. The 12-bit code used on a punched card is
called the Hollerith code.
– In 1941 a German inventor named Konrad Zuse invented
the first modern electromechanical computer which is
called Z3
1.1) A historical Background…
The Electrical age
– This first electronic computing system, which used
vacuum tubes, was invented by Alan Turing. Turing
called his machine Colossus(giant), probably because of
its size.
– Colossus was not programmable—it was a fixed-program
computer system, which today is often called a special
purpose computer.
– The first general-purpose, programmable electronic
computer system was developed in 1946 at the University
of Pennsylvania. This first modem computer was called
the ENIAC (Electronic Numerical Integrator and
Calculator).
– Early 1970s the first small handheld electronic calculator
was introduced by Bomar Corporation and called the
1.1) A historical Background…
Programming Advancements
– first programmable electronic computer system was
programmed by rewiring its circuits.
– computer languages began to appear in order to control
the computer. The first such language, machine language,
was constructed of ones and zeros using binary codes that
were stored in the computer memory system as groups of
instructions called a program
– Mathematician John von Neumann was the first modern
person to develop a system that accepted instructions and
stored them in memory. Computers are often called von
Neumann machines in honor of John von Neumann
1.1) A historical Background…
Programming Advancements
– Once computer systems such as the UNIVAC became
available in the early 1950s, assembly language was used
to simplify the chore of entering binary code into a
computer as its instructions.
– In 1957 Grace Hopper developed the first high-level
programming language called FLOWMATIC
– Same year(1957), IBM developed FORTRAN (FORmula
TRANslator) for its computer systems.
– The FORTRAN language allowed programmers to
develop programs that used formulas to solve
mathematical problems. Another similar language,
introduced about a year after FORTRAN, was ALGOL
(ALGOrithmic Language).
1.1) A historical Background…
Programming Advancements
– The first truly successful and widespread programming
language for business applications was COBOL
(Computer Business Oriented Language).
– Another once-popular business language is RPG (Report
Program Generator), which allows programming by
specifying the form of the input, output, and calculations.
– Since these early days of programming, additional
languages have appeared. Some of the more common
modern programming languages are BASIC, C#, C/C++,
Java, PASCAL, and ADA
1.1) A historical Background…
The Microprocessor Age
– The world’s first microprocessor, the Intel 4004, was a 4-
bit microprocessor–programmable controller on a chip. It
addressed 4-bit-wide memory locations. (A bit is a binary
digit with a value of one or zero. A 4-bit-wide memory
location is often called a nibble(i.e computer memory unit.).)
– Later in 1971, realizing that the microprocessor was a
commercially viable product, Intel Corporation released
the 8008—an extended 8-bit version of the 4004
microprocessor
– In 1977, Intel Corporation introduced an updated version
of the 8080 called the 8085 microprocessor
1.1) A historical Background…
The Modern Microprocessor
– In 1978, Intel released the 8086 microprocessor; a year or
so later, it released the 8088. Both devices are 16-bit
microprocessors, which executed instructions in as little
as 400 ns (2.5 MIPs,or 2.5 millions of instructions per
second).
– In 1989, Intel released the 80486 microprocessor. The
internal structure of the 80486 was modified from the
80386 so that about half of its instructions executed in one
clock instead of two clocks.
– The Pentium Microprocessor. The Pentium, introduced in
1993, was similar to the 80386 and 80486
microprocessors
1.1) A historical Background…
The Modern Microprocessor
– In 1995 Intel released Pentium Pro Processor
– In 1997, Intel released Pentium II and Pentium Xeon
Microprocessors.
– In late 1990s, Intel released Pentium III Microprocessor
– In late 2000s, Intel released Pentium 4 and Core2
Microprocessors.
• The biggest advancement in these technology is not the 64-bit
operation, but the inclusion of multiple cores.
• Each core executes a separate task in a program, which increases
the speed of execution if a program is written to take advantage
of the multiple cores. Programs that do this are called
multithreaded applications
1.1) A historical Background…
The Modern Microprocessor
• Figure 1 is a conceptual
view, comparing the
80486 through Pentium
4 microprocessors. Each
view shows the internal
structure of these
microprocessors: the
CPU, coprocessor, and
cache memory.
• This illustration shows
the complexity and level
of integration in each
version of the
microprocessor
FIGURE 1 Conceptual views of the 80486, Pentium Pro,
Pentium II, Pentium III, Pentium 4, and Core2 microprocessors
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM

– This section shows the structure of the microprocessor-


based personal computer system. This structure includes
information about the memory and operating system used
in many microprocessor-based computer systems.
– See Figure 2 for the block diagram of the personal
computer. This diagram also applies to any computer
system, from the early mainframe computers to the latest
microprocessor-based systems. The block diagram is
composed of three blocks that are interconnected by
buses. (A bus is the set of common connections that carry
the same type of information. For example, the address
bus, which contains 20 or more connections, conveys the
memory address to the memory.)
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

FIGURE 2 The block diagram of a microprocessor-based computer system.


1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

The Memory and I/O System


– The memory system is divided into three main parts: TPA
(transient(gizeyawi)program area), system area, and XMS
(extended memory specification ).
– TPA contain DOS and BIOS
– System area contain programs on either ROMs or Flash
– The type of microprocessor in your computer determines
whether an extended memory system exists.
– If the computer is based upon a really old 8086 or 8088 ,
the TPA and systems area exist, but there is no extended
memory area.
– Computer systems based on the 80286 through the Core2
not only contain the TPA (640K bytes) and system area
(384K bytes), they also contain extended memory
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

The Memory and I/O System

FIGURE 3 The memory


map of a personal computer.
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

The Memory and I/O System


– A change beginning with the introduction of the Pentium
microprocessor and the ATX( Advanced Technology
extended which is a motherboard and power supply
configuration specification developed by intel to improve
on previous de facto standards like the AT design) class
machine is the addition of a bus called the PCI (peripheral
component interconnect) bus, now being used in all
Pentium through Core2 systems.
– Another bus type found in many 80486-based personal
computers is called the VESA (Video Electronics
Standard Association) Local Bus, or VLB bus which
interfaces disk and video to the microprocessor at the
local bus level
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

The Memory and I/O System


– Three newer buses have appeared in ATX class systems.
– The first to appear was the USB (universal serial bus). The universal serial
bus is intended to connect peripheral devices such as keyboards, a mouse,
modems, and sound cards to the microprocessor through a serial data path
and a twisted pair of wires.
• The main idea is to reduce system cost by reducing the number of wires.
• Another advantage is that the sound system can have a separate power supply
from the PC, which means much less noise.
– The second newer bus is the AGP (advanced graphics port) for video cards.
• The advanced graphics port transfers data between the video card and the
microprocessor
• This video subsystem change has been made to accommodate the new DVD
players for the PC.
– The latest new buses to appear are the SATA(Serial Advanced Technology
Attachment)
• Allows hard disks and CD ROMs to be internally connected to the motherboard
and perform basic I/O functions.
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

The Microprocessor
– The microprocessor performs three main tasks for the
computer system:
• (1) data transfer between itself and the memory or I/O systems
• (2) simple arithmetic and logic operations, and
• (3) program flow via simple decisions.
– Data are operated upon from the memory system or internal registers.
– Data widths are variable and include a byte (8 bits), word (16 bits),
and doubleword (32 bits). Note that the earlier 8086–80286 directly
manipulated 8- and 16-bit numbers, but not 32-bit numbers.
– The numeric coprocessor is also capable of performing integer
operations on quadwords (64 bits).
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

Bus
– A bus is a common group of wires that interconnect
components in a computer system.
– In the microprocessor based computer system, three buses
exist for this transfer of information: address, data, and
control.
– The address bus requests a memory location from the
memory or an I/O location from the I/O devices
– The data bus transfers information between the
microprocessor and its memory and I/O address space
– The control bus contains lines that select the memory or
I/O and cause them to perform a read or write operation.
In most computer systems, there are four control bus
connections: (memory read control), (memory write control), (I/O
read control), and (I/O write control).
1.2) THE MICROPROCESSOR-BASED PERSONAL COMPUTER SYSTEM…

Bus
– Note that the overbar indicates that the control signal is
active-low; that is, it is active when a logic zero appears
on the control line.

– For example, if = 0, the microprocessor is writing data


from the data bus to an I/O device whose address appears
on the address bus.
1.3) NUMBER SYSTEMS…
Digits
– Before numbers are converted from one number base to
another, the digits of a number system must be
understood.
– A decimal (base 10) number is constructed with 10 digits:
0 through 9. The first digit in any numbering system is
always zero.
– For example, a base 8 (octal) number contains 8 digits: 0
through 7; a base 2 (binary) number contains 2 digits: 0
and 1. If the base of a number exceeds 10, the additional
digits use the letters of the alphabet, beginning with an A.
For example, a base 12 number contains 10 digits: 0
through 9, followed by A for 10 and B for 11
1.3) NUMBER SYSTEMS…
Positional Notation

– Once the digits of a number system are understood, larger


numbers are constructed by using positional notation.

– In grade school, we learned that the position to the left of


the units position is the tens position, the position to the
left of the tens position is the hundreds position, and so
forth. (An example is the decimal number 132: This
number has 1 hundred, 3 tens, and 2 units.)
1.3) NUMBER SYSTEMS…
Positional Notation
– What probably was not learned was the exponential value
of each position: The units position has a weight of 100, or
1; the tens position has weight of 101, or 10; and the
hundreds position has a weight of 102, or 100.

– The exponential powers of the positions are critical for


understanding numbers in other numbering systems
.
– The position to the left of the radix (number base) point,
is always the units position in any number system.
1.3) NUMBER SYSTEMS…
Positional Notation

– In the decimal system, positions to the right of the


decimal point have negative powers.

– The first digit to the right of the decimal point has a value
of 10-1, or 0.1. In the binary system the first digit to the
right of the binary point has a value of 2-1, or 0.5.
1.3) NUMBER SYSTEMS…
Conversion to Decimal
– The following example shows 110.101 in binary (often
written as 110.1012). It also shows the power and weight
or value of each digit position. To convert a binary
number to decimal, add weights of each digit to form its
decimal equivalent. The 110.1012 is equivalent to a 6.625
in decimal

– Hexadecimal numbers are often used with computers.


A 6A.CH (H for hexadecimal) is illustrated with its
weights in the following example
1.3) NUMBER SYSTEMS…
Conversion from Decimal
– To convert the whole number portion of a number to
decimal, divide by the radix. To convert the fractional
portion, multiply by the radix.
– For example, to convert a 10 decimal to binary, divide it
by 2. The result is 5, with a remainder of 0. The first
remainder is the units position of the result (in this
example, a 0). Next divide the 5 by 2. The result is 2, with
a remainder of 1. The 1 is the value of the twos (21)
position. Continue the division until the quotient is a zero
1.3) NUMBER SYSTEMS…
Conversion from Decimal
– An algorithm for conversion from a decimal fraction is as
follows:
1. Multiply the decimal fraction by the radix (number base).
2. Save the whole number portion of the result (even if zero) as a digit. Note
that the first result is written immediately to the right of the radix point.
3. Repeat steps 1 and 2, using the fractional part of step 2 until the fractional
part of step 2 is zero
1.3) NUMBER SYSTEMS…
Binary-Coded Hexadecimal
– Binary-coded hexadecimal (BCH) is
used to represent hexadecimal data in
binary code.
– Example
2AC = 0010 1010 1100

– The purpose of BCH code is to allow


a binary version of a hexadecimal
number to be written in a form that
can easily be converted between
BCH and hexadecimal. The
following example shows a BCH
coded number converted back to
hexadecimal code

1000 0011 1101 . 1110 = 83D.E


1.3) NUMBER SYSTEMS…
Complements
– At times, data are stored in complement form to represent
negative numbers. There are two systems that are used to
represent negative data: radix and radix - 1 complements. The
earliest system was the radix -1 complement, in which each
digit of the number is subtracted from the radix -1 to generate
the radix -1 complement to represent a negative number.

– Example 1 example 2
1.3) NUMBER SYSTEMS…
Complements
– Today, the radix -1 complement is not used by itself; it
is used as a step for finding the radix complement.
– To form the radix complement, first find the radix -1
complement, and then add a one to the result.
– Example 1

– Example 2
1.4) COMPUTER DATA FORMATS
ASCII and Unicode Data

– Commonly, data appear as ASCII, Unicode, BCD,


signed and unsigned integers and floating-point
numbers (real numbers).

– ASCII (American Standard Code for Information


Interchange) data represent alphanumeric characters in
the memory of a computer system
1.4) COMPUTER DATA FORMATS…
ASCII and Unicode Data

Table 1 standard ASCII code


1.4) COMPUTER DATA FORMATS…
ASCII and Unicode Data
Table 2 Extended ASCII code
1.4) COMPUTER DATA FORMATS…
BCD (Binary-Coded Decimal) Data
– Binary-coded decimal (BCD) information is stored in
either packed or unpacked forms.
– Packed BCD data are stored as two digits per byte and
– Unpacked BCD data are stored as one digit per byte.
– The range of a BCD digit extends from 0000 2 to
10012, or 0–9 decimal.
– Unpacked BCD data are returned from a keypad or
keyboard.
– Packed BCD data are used for some of the instructions
included for BCD addition and subtraction in the
instruction set of the microprocessor.
1.4) COMPUTER DATA FORMATS…
Byte-Sized Data

– Byte-sized data are stored as unsigned and signed


integers. Figure 1–14 illustrates both the unsigned and
signed forms of the byte-sized integer.

– The difference in these forms is the weight of the


leftmost bit position. Its value is 128 for the unsigned
integer and minus 128 for the signed integer
1.4) COMPUTER DATA FORMATS…
Byte-Sized Data

FIGURE 4 The unsigned and signed bytes illustrating the weights of each
binary-bit position.
1.4) COMPUTER DATA FORMATS…
Word-Sized Data
– A word (16-bits) is formed with two bytes of data.
– The least significant byte is always stored in the lowest-numbered memory
location, and the most significant byte is stored in the highest

(a)

FIGURE 6 The storage format for a


16-bit word in (a) a register and (b)
two bytes of memory. (b)
1.4) COMPUTER DATA FORMATS…
Doubleword-Sized Data
Doubleword-sized data requires four bytes of memory
because it is a 32-bit number

(a)

(b)
FIGURE 7 The storage format for a 32-bit word
in (a) a register and (b) 4 bytes of memory.
Questions ?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy