Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
59 views

Practical Lab 1

This document provides an overview of computer architecture and microprocessors. It discusses that a microprocessor is an integrated circuit that contains the functions of a central processing unit. The main parts of a microprocessor are the arithmetic logic unit, register unit, and control unit. It also describes low-level languages like machine language and assembly language, as well as high-level languages. Additionally, it covers number systems like binary, decimal, and hexadecimal and defines a microcomputer as a combination of a microprocessor, memory, and input/output ports.

Uploaded by

Vishal Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Practical Lab 1

This document provides an overview of computer architecture and microprocessors. It discusses that a microprocessor is an integrated circuit that contains the functions of a central processing unit. The main parts of a microprocessor are the arithmetic logic unit, register unit, and control unit. It also describes low-level languages like machine language and assembly language, as well as high-level languages. Additionally, it covers number systems like binary, decimal, and hexadecimal and defines a microcomputer as a combination of a microprocessor, memory, and input/output ports.

Uploaded by

Vishal Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Department of: Subject of:

Computer Systems Engineering Computer Architecture and Assembly


Programming
Mehran University of Engineering Year 2nd Semester 3rd
&Technology
Batch 19CS Duration 03
Hours
Jamshoro

Practical#1

Exploring the basic building blocks of microprocessor

MICROPROCESSOR

An integrated circuit contains all the functions of a central processing unit of a computer.

Integrated circuit: An electronic circuit formed on a small piece of semiconducting material, performing
the same function as a larger circuit.

Very large scale integration: Very-large-scale integration (VLSI) is the process of creating integrated
circuits by combining thousands of transistors into a single  chip.

Transistor: A device composed of  semiconductor  material that amplifies a signal or opens or closes a
circuit. Invented in 1947 at Bell Labs, transistors have become the key ingredient of all digital circuits,
including computers. Today's microprocessors  contain tens of millions of microscopic transistors.

ALU Registers

Control Unit
Figure 1 MICROPROSESSOR UNIT
1
The microprocessor is generally characterized by speed, word length, architecture and instruction set.

Instruction set: An instruction set, or command set, is the basic set of commands understood by the
microprocessor. 

Microprocessor Architecture: The process of data manipulation and communication with peripheral is
determined by the logic design of the microprocessor. The logic design of the microprocessor is called
microprocessor architecture.

Word length: length of the accumulator.

Parts of the Microprocessor

The microprocessor consists of three parts

1. Arithmetic and logic unit(ALU)


2. Register Unit(RU)
3. Control unit(CU)

Arithmetic and logic unit (ALU): In this area of the microprocessor, the computing functions are
performed on data .The ALU performs arithmetic operations such as addition and subtractions and logic
operations such as AND, OR and XOR and results are stored in the register or in memory unit or send to
the output port.

2
Register Unit (RU): This area of the microprocessor consists of the various registers. The registers are
used for temporary storage of data during execution of a program.

Control unit: The control unit provides “necessary timing” and control signals to all the operations in the
microprocessor and peripheral including memory.

Computer Languages

Computer languages are languages which a computer can understand. Computer languages can be
classified as high-level language and low-level language.

Low-level Languages

Low level languages are machine-dependent language. Machine dependent programming language is
designed for a particular computer and reflecting its internal machine code; low–level languages are,
therefore, often described as machine-oriented languages.

Types of Low-level language

1. Machine Language
In machine language the instructions are written in binary .Machine languages are the only
languages understood by computers. While easily understood by computers, machine languages
are almost impossible for humans to use because they consist entirely of numbers. Machine
languages, which are very hard to remember, write down, or correct, with short codes chosen to
remind the programmer of the instructions they represent, are replaced by a mnemonic-based
low-level language known as assembly language.
2. Assembly Language
Instructions in assembly language are written in English alphabets but in coded form. An
assembly language contains the same instructions the same instructions as a machine language,
but the instructions and variables have the names instead of being just numbers. For example,
the he binary-coded instructions 13H (00010011) that means “store the contents of the
accumulator in memory “

As machine languages are the only languages understood by computer assembly languages are
to be converted into machine languages. This conversion is done either by manually or by a
software program known as assembler.

High-level Language

High-level languages are machine independent languages .programs written for a particular machine can
run on other machines also. These high-level languages are also known as problem-oriented languages
because they are designed to solve particular problems. The main advantages of these high-level
languages are that they are easier to read, write and maintain.

3
Programs written in high-level languages are converted into machine language by an interpreter or a
compiler.

Number systems

1. Decimal Number System


2. Binary Number System
3. Hexadecimal Number System

Decimal number System: The decimal numeral system (also called base ten or occasionally denary) has
ten as its base .A numbering system that uses ten digits, from 0 to 9.

Binary number System: A method of representing numbers in which only the digits 0 and 1 are used.
Successive units are powers of 2.

10111=1X2+0X2+1X2+1X2
4 3 2 1+ 1X20
=23
Hexadecimal number System: The hexadecimal number system (also called base-16) is a number system
that uses 16 unique symbols to represent a particular value. Those symbols are 0-9 and A-F.

Decimal Binary Number Hexadecimal


Number

4
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

0 1 1 01 1 0 1
6 D =6D (HEX)

Microcomputer

The complete combination of microprocessor, memory and input and output ports is collectively
referred to as a microcomputer

5
Input/output
Memory PORT
MAT 385 is a complete single board microcomputer.

The microprocessor communicates with the memory--- both to obtain the individual instructions which
make up the program and to access and store data and to transfer data to and from output and input
ports using bus.

The data bus is used to carry the data associated with a memory or input/output transfer. In the
MAT385 the data bus is 8 bits wide. The address bus is used to specify the memory location or
input/output port involved in a transfer. The control bus is made up of lines carrying various control
signals generated by the microprocessor and other system components to synchronize transfers.

The address bus consists typically of 16 lines on which a binary coded address can be presented to a
memory or input output ports. The range of possible addresses is therefore from 0000(hex) to FFFF
(hex), i.e. 65536(decimal) separate addresses. Thus a typical microprocessor, such as the 8085, can
address up to 65536 (decimal) memory locations each containing 8-bits (or one byte) of information.
Hence an 8085 system can have a maximum of 64k memory locations (64X1024=65536).

Memory

Memory unit is an essential component of a computer as it stores binary instructions and data. It is used
for storing data/instructions during their execution and to show the results after the execution of
instructions. The amount of memory contained in a computer is measured in bits with one bit ( 0 or 1)
being the unit of memory .A group of four bits is called a nibble while a group of eight bits is called a
byte .A binary word/data of a computer denotes the data that its CPU can process (add / subtract etc ).

For example ,an 8-bit microprocessor can handle binary word of maximum length of eight bits, a 32-bit
Pentium processor can manipulate binary word of length 32-bits.The memory size of a computer is
measured in kilobytes(1k=1024=210 )storing locations. The number of memory location is determined by
the size of memory available in a computer.

Memory size=2^n

6
For example, a 1KB memory=210 bytes, therefore, p=10 bits required to specify a memory location; a
1MB memory= 220 bytes .The value of n specifies the number of address lines required to access the
memory location. For example to access any of the 1024 memory locations we require 10 address lines.
The 16 address lines of up 8085 can address 216 memory locations (=65536 binary words) with each
memory address being 16-bit long and capable of storing a byte of data in it. Instead of expressing the
memory address by a 16-bit number, we use compact hexadecimal codes in which memory address
range from 0000(H) to FFFF (H).

FFFF
8800
87FF
8400
83FF
8000
7FFF
Not used 2900
28FF

RAM 2800
27FF
RAM
Non-volatile 2100
20FF
Not used
2000
1FFF
0800
RAM
07FF

Memory Map Not used


The range of address that are used and the type of memory in each range can
be indicated by a memory map. RAM Memory map is shown in previous
page.
0000
Not Used

Memory Units
ROM

7
Unit Symbol Byte Value

1 Bit Bit 1 bit (0 or 1)

1 Byte B 8 bits

1 Kilobyte KB 210 =1024 bytes

1 MegaByte MB 220 =1024 KB

1 GigaByte GB 230=1024 MB

1 TeraByte TB 240=1024 GB

1 Peta Byte PB 250=1024 TB

1 Exa Byte EB 260 =1024 PB

1 Zeta Byte ZB 270=1024 EB

1 Yota Byte YB 280=1024 ZB

1 Broto Byte 290=1024 YB

1 Geop Byte 2100 =1024 Broto Byte

Lists Of microprocessors

Chips year Data Bus Address Bus


4004 1971 4 8

8008 1972 8 8

8080 1974 8 16

8085 1977 8 16

8
8086 1978 16 20

8088 1978 8 20

80186 1982 16 20

80188 1982 8 20

80286 1983 16 24

80386 1986 32 32

Exercise

Q.1 Find the number of total memory accessed based on the address bus of each microprocessor?

Chips year Data Bus Address Bus Memory


4004 1971 4 8 28 =256

9
8008 1972 8 8
8080 1974 8 16
8085 1977 8 16
8086 1978 16 20
8088 1978 8 20
80186 1982 16 20
80188 1982 8 20
80286 1983 16 24
80386 1986 32 32

Q.2 Convert following decimal number into hexadecimal numbers.

1) (256)10
2) (375)10
3) (987)10
4) (65536)10
5) (1024)10
Note: Please do not use calculator and write down each step during conversion.

Q.3 Convert the following binary numbers to their decimal and hexadecimal equivalent

1) 10000000 2) 00110011 3) 00011111


4) 00010000 5) 01100100 6) 11111111

10
Q.4 Convert the following negative numbers to binary equivalent using 2s complement notation.

1) -10 2)-21 3)-34 4)-96 5)-1 6)-128

7)-4 8)-5 9)-6 10)-8 11)-227

Q.5 what are the advantages and disadvantages of low level language?

Q.6 what are the advantages and disadvantages of high level language?

11

You might also like