Prelude
BIT=Binary Digit: 0's and 1's
1 nibble=4 Bits
1 nibble=4 Bits
1 Byte= 8Bits for example 1010 0101
1KiloByte(KB)= 1024 Bytes
1 Mega Byte(MB)= 1024KB
The digital circuit is a device that works in
binary.There are only two symbols in binary(0's and 1's) . It means, input and output
of digital circuits are 0’s and 1’s. Digital circuits are used to implement
electronics device and it is used in real world. But in real world, there are
no 0’s and 1’s. Instead of 0’s and 1’s, continuously varying voltages will be
used as inputs and outputs. Because the world is analog, whatever available in
reality will vary continuously. But in digital circuits 0’s and 1’s will be
considered as inputs and outputs. In digital circuits range of voltages are
interpreted as binary 0 and 1.Digital circuit model enables one to focus on the
digital behavior of a circuit(0's and 1's), to ignore analog and transient
phenomena, and to easily build larger, more complex circuits out of small
circuits.
What
is Logic '0' and Logic '1'?
Range
of voltage close to Vcc is represented as
logic ‘1’(High) and range of voltage close to gnd is represented as logic
‘0’(Low). Logic '1' and '0' are just symbols, it is not available in
the real world.
For Example consider CMOS logic levels
How this logic levels related to Microprocessor?
Communication
with Microprocessor or any other digital circuit can be done using
logic '0' and logic '1'. But logic '0' and '1' are not available in the
real world. so, we are considering digital abstraction by assuming
certain range of voltage close to Vcc as logic '1' and voltage close to
ground as logic '0'.
Microprocessor is also Digital Integrated circuit. Digital Integrated circuits can be designed using logic gates.Those logic gates are designed using transistors. Voltage should be applied to either switch on or switch off the transistor.In order to switch on the transistor certain range of voltage should be applied and in order to switch off the transistor certain range of voltage should be applied.
Logic levels of CMOS Logic family
|
How this logic levels related to Microprocessor?
Microprocessor is also Digital Integrated circuit. Digital Integrated circuits can be designed using logic gates.Those logic gates are designed using transistors. Voltage should be applied to either switch on or switch off the transistor.In order to switch on the transistor certain range of voltage should be applied and in order to switch off the transistor certain range of voltage should be applied.
Microprocessor
Age
1. 4004 is the world first Central processing
unit(CPU) designed by Intel in 1971.It is 4-bit CPU, and fabricated in
P-channel MOSFET technology. It can address 4096 4-bit wide memory locations. A
4-bit-wide memory location is often called a nibble. 4004 has totally 45
instructions and it will execute with the speed of 50 Kilo-instruction per
second (KIPs). The weight of 4004 is less than an ounce(28.3grams).
2. 8008 microprocessor is designed and
manufactured by Intel in April 1972. It is extended 8 bit version of 4004. It
is an 8-bit CPU with an external 14-bit address bus that can address 16 KB of
memory.
3. 8080 microprocessor is designed and manufactured
by Intel in 1974. It is the first modern 8 bit processor from Intel. About 6
months after 8080 microprocessor release , Motorola corporation introduced
MC6800 microprocessor.
4. Intel introduced 8085 in 1977 which is the
updated version of Intel 8080 microprocessor. The 8085 is the last 8-bit,
general-purpose microprocessor developed by Intel. Although only slightly more
advanced than an 8080 microprocessor, the 8085 executed software at an even
higher speed. An addition that took 2.0 μs (500,000 instructions per second on
the 8080) required only 1.3 μs (769,230 instructions per second) on the 8085.
The main advantages of the 8085 were its internal clock generator, internal
system controller, and higher clock frequency. This higher level of component
integration reduced the 8085’s cost and increased its usefulness.
5. Intel released 8086 microprocessors in 1978 and a year later, it released 8088. Both 8086 and 8088 are 16-bit microprocessors, which execute instruction in 400ns which is 2.5 million of Instruction per Second (MIPs). While considering execution speed 8086 is significantly faster than 8085. 8086 and 8088 can address 1MB(megabyte) of memory, Which is 16 times more than 8085.
Introduction to Processor 5. Intel released 8086 microprocessors in 1978 and a year later, it released 8088. Both 8086 and 8088 are 16-bit microprocessors, which execute instruction in 400ns which is 2.5 million of Instruction per Second (MIPs). While considering execution speed 8086 is significantly faster than 8085. 8086 and 8088 can address 1MB(megabyte) of memory, Which is 16 times more than 8085.
Microprocessor recognize and operate in binary number. Each microprocessor has its own set of binary words, meanings and language. The word is defined as the number of bits the microprocessor recognize and process at a time.The word length ranges from 4 bits for small microprocessor based systems to 64 bits for high speed large computer.
Each machine has its own set of
instructions based on the design of its CPU. One must give instruction in binary language (machine
language) to communicate with CPU.It is difficult for most of the people to write program in set of 0’s
and 1’s.So, computer manufactures have decided English like words to represent the
binary instruction of a machine which is nothing but Assemble language. Assembly language is specific to a given
machine, programs written in assembly language are not transferable from one
machine to another.
Machine Language
The number of bits is a word for a given machine is fixed, and words are formed through various combination of these bits.For example, a machine with a word length of eight bits can have 256(2^8) combination of eight bits. However not all these words need to be used in the machine as instruction.
The number of bits is a word for a given machine is fixed, and words are formed through various combination of these bits.For example, a machine with a word length of eight bits can have 256(2^8) combination of eight bits. However not all these words need to be used in the machine as instruction.
The microprocessor design
engineer selects the combination of bit patterns and gives a specific meaning
to each combination by using electronic logic circuit. That combination of bits is called as
instruction.
The set of instructions designed in to the machine makes up its machine language a binary language, composed of 0’s and 1’s that is specific for each computer. Machine language depends on the design of the machine. For example 8-bit processor designed by Intel design engineer will be different when compared to the 8-bit processor designed by Motorola engineer. It is because the designer is different, so,the assumption of combination of bits considering for the instruction also will be different.We know that, Considering different combination of bits will end up with different digital circuit for the assumed combination of bits.
The set of instructions designed in to the machine makes up its machine language a binary language, composed of 0’s and 1’s that is specific for each computer. Machine language depends on the design of the machine. For example 8-bit processor designed by Intel design engineer will be different when compared to the 8-bit processor designed by Motorola engineer. It is because the designer is different, so,the assumption of combination of bits considering for the instruction also will be different.We know that, Considering different combination of bits will end up with different digital circuit for the assumed combination of bits.
8085 Machine Language
- The 8085 is a microprocessor with 8 bit word length. Its instruction set is designed by using various combination of eight bits.
- An instruction is a binary pattern entered through an input device in memory to command the microprocessor to perform specific function.
- For Example,0011 1100:is an instruction that increments the number in the register called accumulator by one.1000 0000:is an instruction that adds the number in the register called B to the number in the accumulator, and keep the sum in accumulator.
- The 8085 microprocessor has 256 such bit patterns, amounting to 74 different instructions are called an instruction set the binary language with predefined instruction set is called the 8085-machine language.
- It is tedious for people to recognize and write instruction in binary language, so, the instruction is for convenience, written in hexadecimal code and entered in a single board microcomputer by using hexadecimal keys.
- For example, the binary instruction 0011 1100 is equivalent to 3C in hexadecimal. This instruction can be entered in a single board microcomputer with a hex key board by pressing 3 and C.
8085 Assembly Language
- Even though the instruction can be written in hexadecimal code, it is still difficult to understand a program written in hexadecimal numbers.
- Each manufacturers of a microprocessor have deviced a symbolized code for each instruction, called a mnemonic, the mnemonics for particular instruction consist of letter that suggests the operation to be performed by the instruction.
- For example: the binary code 0011 1100(3CH) of the 8085 microprocessor is represented by the mnemonic INR A. (H - hexadecimal number- refer Appendix 1)
- INR A-INR stands for increment, and A represent the accumulator. This symbol suggests the operation of increments the accumulator content by one.
- Similarly, the binary code 1000 0000(80H) is represented as ADD B, ADD stands for addition and B represents the content is register B. This symbol suggests the addition of the contents in register B and the contents in the accumulator.
- The program written in assembly language is called assembly language program.
- Again, the assembly language or mnemonics, is specific to each microprocessor. For example, 6800 Motorola microprocessor has an entirely different set of binary codes and mnemonics than the 8085 therefore, the assembly language of 6800 is far different from that of 8085.
- An assembly language program written for one microprocessor is not transferable to a computer with another microprocessor unless the microprocessor is compatible in their machine codes.
- Machine language and assembly language are microprocessor specific and both are considered as low-level language.
- Machine language is in binary,
and the assembly language is in English like words. Microprocessor understand only
binary language.
How the assembly language mnemonics written and translated in to machine language or binary code?
The mnemonics can be written by hand on paper and translated manually is hexadecimal codes, called hand assembly.
The mnemonic can be written electronically on a computer using a program called editor in the ASCII Code and translate in to binary code by using the program called an assembler.
ASCII Code
- A computer is binary machine, to communicate with computer in alphabetical letters and decimal numbers, translation codes are necessary.
- The commonly used code is ASCII-American standard code for information interchange.It is 7-bit code with 128(2^7) combination, and each combination from 00H to 7FH is assigned to either a letter, a decimal number a symbol or a machine command.
- For example, hexadecimal 30H to 39H represent 0 to 9 decimal digits,41H to 5AH represents capital letters A through Z.
- In microcomputers systems, keyboards, video screens and printers are typical examples of device that use ASCII codes.
- When the key 9 is pressed on the ASCII keyboard, the computer receives 39H in binary called an ASCII character and system program translates ASCII character in to appropriate number.
Appendix 1
Hexadecimal number system
Base or radix of hexadecimal number is 16. It means 16 symbols available
in hexadecimal number system. Combination of those symbols can be used to write numbers in hexadecimal. The 16 hexadecimal symbols are 0,1,2,3,4,5,6,7,8,9,
A, B, C, D, E, F.
For example, base or radix of decimal number is 10. It means
10 symbols available in decimal number system. Combination of those symbols can be used to write numbers in decimal. The 10 decimal symbols are 0,1,2,3,4,5,6,7,8,9.
Base or radix for binary number is 2. The 2 binary symbols are 0,1.
Following table represent the relationship between decimal
binary and hexadecimal numbers.
Decimal Numbers (Base10)
|
Binary Numbers (Base 2)
|
Hexadecimal Numbers (Base 16 or H)
|
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
|
(4 base 10)= (0100) base 2= (4 base 16 or 4H)
4 in decimal = 0100 in binary = 4 in hexadecimal
10 in decimal =1010 in binary = A in hexadecimal(AH)
45 in decimal = 0010 1101 in binary = 2D in hexadecimal (I can
represent as 2DH)
How to convert binary number in to hexadecimal number?
Let as consider a
random binary number i) 101011001
Step 1: From right hand side group 4 bits (Last group may
have less than 4 bits in the group. If it is less pad with zeros).
Step 2: Refer table and write the equivalent hexadecimal
number for each group.
1
|
0101
|
1001
|
Group 4, 4 bits starting from right
|
1
|
5
|
9
|
Refer table and write equivalent hexadecimal number
|
Padding zeros to the last group. Padding zeros to the left
will not change that number. For example, 45 in decimal is equivalent to 0045
in decimal.
0001
|
0101
|
1001
|
Group 4, 4 bits starting from right
|
1
|
5
|
9
|
Refer table and write equivalent hexadecimal number
|
101011001 in binary = 159H
ii) binary number =11110111101011
Step 1: From right hand side group 4 bits (Last group may
have less than 4 bits in the group. If it is less pad with zeros).
Step 2: Refer table and write the equivalent hexadecimal
number for each group.
0011
|
1101
|
1110
|
1011
|
Group 4, 4 bits starting from right
|
3
|
D
|
E
|
B
|
Refer table and write equivalent hexadecimal number
|
11110111101011 in binary = 3DEBH
Why numbers are represented in hexadecimal instead of binary?
Hexadecimal numbers are used for representing binary numbers
with a smaller number of digits. Hexadecimal number are only used for
representation purpose, but processor or other digital circuits will not
understand hexadecimal.
Whether microprocessor understand hexadecimal numbers?
No, microprocessor understand only binary numbers (Machine
language). To represent binary numbers
with less number of digits hexadecimal number system is used.

Very Good article. very understanding article about basic concepts of Microprocessor, Assembly Language. I wish more articles from your blog
ReplyDeletePrecised and to the point explanation.
ReplyDeleteThis will definitely help the ones to understand the basics of micro processors in a short time instead of referring many standard books.
Waiting for further blogs.
Very good approach to fundamentals of microprocessor and easy to learn
ReplyDeleteNice one. Keep up the good work . Waiting for more... Articles like this .
ReplyDeleteMore informative and easily understandable article.very good introduction to processor and the relation of logic levels to it.the history of microprocessor and the languages,code are really informative.
ReplyDelete