0% found this document useful (0 votes)
2 views38 pages

Microprocessor Week 1

This document provides an introduction to microprocessor-based computer systems, detailing the structure and components of personal computers. It covers memory organization, the role of the microprocessor, data transfer, and basic operations, as well as number systems and data formats. Additionally, it explains the importance of buses for communication within the system and the significance of understanding data formats for successful programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views38 pages

Microprocessor Week 1

This document provides an introduction to microprocessor-based computer systems, detailing the structure and components of personal computers. It covers memory organization, the role of the microprocessor, data transfer, and basic operations, as well as number systems and data formats. Additionally, it explains the importance of buses for communication within the system and the significance of understanding data formats for successful programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

Chapter 1 Introduction to

Microprocessor and the


Computer
The Microprocessor based Computer
System

Computer systems have


undergone many changes
recently. Machines that once Here we are going to examine
filled large areas have been the structure of the MP-based
reduced to small desktop personal computer system.
computer system because of
the microprocessor.
Above is the diagram of
the personal computer.
For instance, the
There are three blocks
address bus constains
connected by buses. A
20 or more connections,
bus is a set of common
conveys the memory
connections that carry
address to the memory.
the same type of
information.
The
Memory • The memory system is divided
into three main parts.
• TPA (Transient Program Area)
and the • System Area
• XMS (Extended Memory
I/O System)

System
TPA (Transient Program Area)

TPA HOLDS THE DOS (DİSK OPERATİNG SYSTEM) AND TPA ALSO STORES ACTİVE AND İNACTİVE DOS
OTHER PROGRAMS THAT CONTROL THE COMPUTER APPLİCATİON PROGRAMS.
SYSTEM. THİS İS A DOS CONCEPT NOT REALLY APPLİCABLE
TO WİNDOWS.
• Note the hexadecimal memory address or memory locations. These are used to
number each byte of the memory system.
• 1234H or 0x1234
• The interrupt vectors access various features of DOS, BIOS and applications.
• The [Link] is the program that allows DOS to use the keyboard, video display,
printers.
• Drivers are programs that control installable I/O devices such as mouse, disk or
CDROM.
• [Link] controls the operation of the computer from the keyboard
when operated in DOS mode.
• Never erase the [Link], [Link] or [Link] to make room for other
software or your computer will not function.
The System Area
The area at locations C8000H–DFFFFH is often open or free. This area is used for the expanded
memory system (EMS) in a PC.

Memory locations E0000H–EFFFFH contain the cassette BASIC language on ROM found in early
IBM personal computer systems. This area is often open or free in newer computer systems.

Finally, the system BIOS ROM is located in the top 64K bytes of the system area (F0000H–FFFFFH).
This ROM controls the operation of the basic I/O devices connected to the computer system. It
does not control the operation of the video system, which has its own BIOS ROM at location
C0000H. The first part of the system BIOS (F0000H–F7FFFH) often contains programs that set up
the computer; the second part contains procedures that control the basic I/O system.
Windows Systems
I/O Space
MANY I/O DEVİCES ARE NOT DİRECTLY ADDRESSED. ACCESS TO MOST I/O DEVİCES SHOULD ALWAYS BE MADE
INSTEAD, THE SYSTEM BIOS ROM ADDRESSES THESE THROUGH WİNDOWS, DOS OR BIOS FUNCTİON CALLS TO
BASİC DEVİCES WHİCH CAN VARY İN LOCATİON AND MAİNTAİN COMPATİBİLİTY FROM ONE COMPUTER
FUNCTİON FROM ONE COMPUTER TO ANOTHER. SYSTEM TO ANOTHER.
The Microprocessor

The MP is the controlling element in a computer system. It is also referred to as CPU (Central
Processing Unit). It controls memory and I/O through a series of connections called buses.

The buses select an I/O or memory device,


transfer data between the I/O device or Memory and I/O are controlled through instructions that
memory and the MP control the I/O and are stored in the memory and executed by the MP.
memory system.
The MP performs three main tasks:
Data transfer between itself and Simple arithmetic and logic Program flow via simple
the memory or I/O system. instructions decisions.

The power of MP is its capability to execute billions of millions (MIPS,


FLOPS) of instructions per second from a program (software, a group
of instructions) stored in the memory system.
Arithmetic and Logic Operations

These operations are very basic but using them, very complex problems are solved. Data are
operated upon from the memory system or internal registers.

Addition, subtraction, multiplication, division, AND, OR, NOT, NEG, shift, rotate

Data widths may vary:

Byte: 8 bits Word: 16 bits Double Word: 32 bits


Decisions
• Simple decisions are used to control the program flow which allows
making decisions through numeric facts.
• Zero (Test a number for zero or not zero)
• Sign (Test a number for positive or negative)
• Carry (Test for carry after addition or borrow after subtraction)
• Parity (Test a number for an even or odd number of ones)
• Overflow (Test for overflow which indicates an invalid result after
signed addition or subtraction)
Buses
• A bus is a common group of wires
that interconnect components in a
computer system. They transfer
address, data or control information
between the MP and its memory
and I/O systems.
WHEN ADDRESSİNG I/O, THE 16 BİT I/O ADDRESS CAN ON THE OTHER HAND, WHEN ADDRESSİNG MEMORY, THE DATA BUS TRANSFERS İNFORMATİON BETWEEN
SELECT ONE OF THE 64 I/O DEVİCES FROM 0000H TO 20 BİT ADDRESSES ARE USED FROM 00000F TO MP AND İTS MEMORY AND I/O SYSTEM. DATA
FFFFH. FFFFFH İN ORDER TO ADDRESS 1MBYTE OF MEMORY. TRANSFER VARY İN SİZE FROM 8BİTS WİDE TO 64 BİTS
WİDE. 8086 CAN TRANSFER 16 BİTS OF DATA
THROUGH THEİR BUSES, CORE2 CAN TRANSFER 64
BİTS.
• The control bus contains lines that select the memory or I/O and
cause them to perform a read or write operation. 𝑀𝑅𝐷𝐶, 𝑀𝑊𝑇𝐶,
𝐼𝑂𝑅𝐶, 𝐼𝑂𝑊𝐶.
• 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 MP is writing data from the
data bus to an I/O device whose address appears on the
address bus.
Number Systems
• Digits:
• Base 10 :0-9 (decimal)
• Base 2: 0-1 (binary)
• Base 8: 0-7 (octal)
• Base 16: 0-15 (hexadecimal) A=10, B=11, C=12, D=13, E=14, F=15
• Positional Notation
• Positions to the left of the radix (number base) point -> positive power
• Positions to the rightof the radix (number base) point -> negative power
• Ex 1. Conversion from binary to
decimal

• Ex 2. Conversion from base 6 to


decimal
• Ex 3. Conversion from hexadecimal to
decimal

• Ex 4. Conversion from decimal (whole


number)
• Ex 5. Conversion from decimal to octal

• Ex 6. Conversion from decimal to


hexadecimal
Converting from a decimal
fraction
• Algorithm
1. Multiply the decimal fraction by the radix (base).
2. Save the whole number portion of the result as a digit
(event it is a zero). Note that the first result is
immediately to the right of the radix point.
3. Repeat steps 1 and 2, us,ing the fractional part of step 2
until the fractional part of step 2 is zero.
Ex 7.
0.125 * 2 = 0.25 * 2 = 0.5 0.5 * 2 = 1.0
Conversion to 0.125 = X2
0.25 digit is 0 digit is 0 digit is 1
binary

Ex 8.
0.125 * 8 = 1.0
Result is 0.0012 Conversion to 0.125 = X8 Result is 0.18
digit is 1
octal

Ex 8.
0.46875 * 16 = 0.75 * 16 =
Conversion to 0.46875 = X16 Result is 0.0C16
0.75 digit is 0 12.0 digit is C
hexadecimal
Binary Coded
Hexadecimal
Complements
1 1 1 1 1 1 1 1
0 1 0 0 1 1 0 0
1 0 1 1 0 0 1 1
15 15 15
5 C D
A 3 2
Radix-1 complement is not used by itself; it is used as a step for finding
radix complement which is used to represent negative numbers in modern
computer systems.

To find radix complement, first find radix-1 complement then add 1 to the
result.

Note that the problem with radix-1 complement is that a negative or


positive zero exists; in the radix complement system only a positive zero
can exist.
• Ex 14.
1 1 1 1 1 1 1 1
0 1 0 0 1 0 0 0
1 0 1 1 0 1 1 1 1’s complement
1
1 0 1 1 1 0 0 0 2’s complement

• Ex 15.
15 15 15
3 4 5
15’s complement
C B A
1
16’s complement
C B B
• To prove that 01001000 is the
inverse (negative)of a 10111000,
add the two together to form an 8-
digit result. The ninth digit is
dropped and the result is zero.
Computer Data
Formats
Successful programming requires precise
understanding of data formats.
ASCII and Unicode Data

7 bit code with the eight If used with a printer, Since Windows, Unicode
and most significant bit most significant 0 for is used to store
used to hold parity (in old alphanumeric printing, 1 alphanumeric data (each
systems). for graphics printing. character is 16 bit).
BCD (Binary Coded Decimal) Data

BCD information is stored in either packed or unpacked The range of a BCD digit extends from 0000 2 to 10012 or 0-
forms. Packed BCD data are stored as two digits per byte 9 for decimal.
and unpacked BCD data are stored as one digit per byte.
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 MP.
Decimal Packed Unpacked
12 0001 0010 0000 0001
0000 0010
623 0000 0110 0000 0110
0010 0011 0000 0010
0000 0011
• Byte sized data
• Byte-sized data are stored as unsigned and signed integers.
128 64 32 16 8 4 2 1

Unsigned byte

-128 64 32 16 8 4 2 1

Signed byte
• Whenever a number is two’s complement, its sign changes from
negative to positive or positive to negative.
+8 0 0 0 0 1 0 0 0
1 1 1 1 0 1 1 1 1’s complement
1
-8 1 1 1 1 1 0 0 0 2’s complement

You might also like