EEEE3205: Microprocessors and applications
Tutorial 1
1. Perform the following conversions:
i) 11100.01101 2 to Octal and Hexadecimal
ii) 1101101010 2 to Octal and Hexadecimal
2. Convert the following numbers to binary.
i) 11910
ii) 19.12510
iii) 32510
3. Convert the numbers to hexadecimal and octal.
i) 11910
ii) 19.12510
iii) 32510
4. Convert the binary 11001101.001112 into equivalent Octal number.
5. Write the BCD for the following decimal numbers:
i) 17.89
ii) 299
6. Compute the 1’s and 2’s complement of the following binary numbers. Also find the
decimal equivalent of the number.
i) 1110 0010
ii) 0111 1110
iii) 0000 0000
7. Add the following decimal numbers by converting them to 8-bit signed 2’s complement
notation.
i) +56 and – 56
ii) +65 and –75
iii) -121 and -8
Identify, if there is overflow.
8. Represent the floating point number -29.25 using 32 bits (mantissa and exponent)
representation.
9. A number using 32 bits (mantissa and exponent) representation is given below, what is
the equivalent decimal value?
10. Write a program to; Store the data 32H into memory location 4000H.
NB: Use only mnemonics and opcodes, include comments.
8085 Instruction Set
The 8085 instruction set can be classified into the following five functional headings.
1. Data Transfer Instructions
These instructions move data between registers, or between memory and registers.
These instructions copy data from source to destination.
While copying, the contents of source are not modified.
Opcode Operand Description
Rd, Rs
MOV M, Rs Copy from source to destination.
Rd, M
Rd, Data
MVI Move immediate 8-bit
M, Data
LDA 16-bit address Load Accumulator
LDAX B/D Register Pair Load accumulator indirect
LXI Reg. pair, 16-bit data Load register pair immediate
STA 16-bit address Store accumulator direct
STAX Reg. pair Store accumulator indirect
XCHG None Exchange H-L with D-E
2. Arithmetic Instructions
These instructions perform arithmetic operations such as addition, subtraction, increment, and
decrement.
Opcode Operand Description
ADD RM Add register or memory to accumulator
ADC RM Add register or memory to accumulator with carry
ADI 8-bit data Add immediate to accumulator
ACI 8-bit data Add immediate to accumulator with carry
SUB RM Subtract register or memory from accumulator
SUI 8-bit data Subtract immediate from accumulator
INR RM Increment register or memory by 1
INX R Increment register pair by 1
DCR RM Decrement register or memory by 1
DCX R Decrement register pair by 1
3. Logical Instructions
These instructions perform various logical operations with the contents of the accumulator.
Opcode Operand Description
CMP RM Compare register or memory with accumulator
CMP RM Compare register or memory with accumulator
CPI 8-bit data Compare immediate with accumulator
ANA RM Logical AND register or memory with accumulator
ANI 8-bit data Logical AND immediate with accumulator
Exclusive OR register or memory with
XRA RM
accumulator
ORA RM Logical OR register or memory with accumulator
ORI 8-bit data Logical OR immediate with accumulator
XRA RM Logical XOR register or memory with accumulator
XRI 8-bit data XOR immediate with accumulator
4. Branching Instructions
This group of instructions alters the sequence of program execution either conditionally or
unconditionally.
Opcode Operand Description
JMP 16-bit address Jump unconditionally
Jx 16-bit address Jump conditionally
5. Machine Control Instructions
These instructions control machine functions such as Halt, Interrupt, or do nothing.
Opcode Operand Description
HLT None Halt
NOP None No operation
The interrupt enable flip-flop is set and all
EI None interrupts are
enabled. No flags are affected.
The interrupt enable flip-flop is reset and all the
interrupts
DI None
except the TRAP are disabled. No flags are
affected.
This is a multipurpose instruction and used to
SIM None implement the
8085 interrupts 7.5, 6.5, 5.5, and serial data output.
This is a multipurpose instruction used to read the
RIM None status of
interrupts 7.5, 6.5, 5.5 and read serial data input bit.