









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










INSTRUCTIONS AND EMULATOR DOWNLOAD: IIT Bombay Virtual Lab AIM: Addition of two 8bit numbers, sum 8 bit. THEORY:
8085 BOOK EXP -
Aim: a) Subtraction of two 8 bit numbers along with considering borrow b) Subtraction of two 16 bit numbers along with considering borrow THEORY: SUB: - substract the content of a register or a memory location form the content of accumulator and the result is stored in the accumulator. Eg: - SUB B( it substracts the content of B register from the content of the accumulator. SUB M( it substracts the content of memory location pointed by HL pair from the content of accumulator. SBB: - substract with borrow. Eg: - SBB B SBB M SUI: - Substract immediate from accumulator. this instruction subtract the immediate data from the content of accumulator and the result is store in accumulator. Eg: - SUI 45H
Course Outcome mapped: CO Aim: a) 1's complement of 8 bit number b) 2's complement of 8 bit number Theory: There is a simple algorithm to convert a binary number into 1’s complement. To get 1’s complement of a binary number, simply invert the given number. You can simply implement logic circuit using only NOT gate for each bit of Binary number input. Implementation of logic circuit of 4-bit 1’s complement is given as following below. Example-1: Find 1’s complement of binary number 10101110. Simply invert each bit of given binary number, so 1’s complement of given number will be 01010001. Example-2: Find 1’s complement of binary number 10001.001. Simply invert each bit of given binary number, so 1’s complement of given number will be 01110.110. Code: a)
Course Outcome mapped: CO 2 and CO AIM: a) 1’s complement of 16-bit number b) 2’s complement of 16-bit number Theory: There is a simple algorithm to convert a binary number into 2’s complement. To get 2’s complement of a binary number, simply invert the given number and add 1 to the least significant bit (LSB) of given result. Implementation of 4-bit 2’s complementation number is given as following below. Example-1 − Find 2’s complement of binary number 10101110. Simply invert each bit of given binary number, which will be 01010001. Then add 1 to the LSB of this result, i.e., 01010001+1=01010010 which is answer. Example-2 − Find 2’s complement of binary number 10001.001. Simply invert each bit of given binary number, which will be 01110. Then add 1 to the LSB of this result, i.e., 01110.110+1=01110.111 which is answer.
Code: a) b) Related Readings:Complements arithmetic
Code: a) b) Related Readings:Logical Instructions
CO MAPPED : CO AIM : a) Shift a 16 -bit number to left by1-bit b)Shift a 16-bit number to left by2-bits. manual // SHIFT AN 16-BIT NUMBER LEFT BY 1 BIT // The number to be shifted is stored in C050 & C // Answer is stored in C052 & C
LHLD C DAD H // this cannot be achived by RLC SHLD C HLT // EXAMPLE-> C050=96,C051= // Answer-> C052=2C,C053=EB