0% found this document useful (0 votes)
91 views5 pages

Program No. 3 Addition of Two 8 Bit Numbers Without Carry

This document describes an assembly language program that adds two 8-bit numbers without carry and stores the result in memory location 9000h. It provides two methods for addition - using an immediate value to the accumulator register, and adding the accumulator and another register without carry. The program is executed and verified to add 14h + 27h, storing the result of 3Eh in memory location 9000h. Flowcharts are included for each method.

Uploaded by

jithabhasu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
91 views5 pages

Program No. 3 Addition of Two 8 Bit Numbers Without Carry

This document describes an assembly language program that adds two 8-bit numbers without carry and stores the result in memory location 9000h. It provides two methods for addition - using an immediate value to the accumulator register, and adding the accumulator and another register without carry. The program is executed and verified to add 14h + 27h, storing the result of 3Eh in memory location 9000h. Flowcharts are included for each method.

Uploaded by

jithabhasu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

PROGRAM NO.

3 ADDITION OF TWO 8 BIT NUMBERS WITHOUT CARRY


AIM: To write an assembly language program to add two 8 bit numbers without carry and store the result in 9000h memory location. EQUIPMENTS REQUIRED: SL NO $ + . Equipment ES% 8& 'it ES% (ower Supply (ower chord /onnector a!e ES% () LT* ES% () LT* &),-% Speci"ication #uantity $ $ $ $

ALGORITHM: Method I: I $. ed!"te "dd!t!o#

o0e an 8bit immediate data to % register.

+. %dd accumulator with an immediate data +1h -. Store the % register content to memory location 9000h. &. Stop the program.

Method II: Add!t!o# $%!#& 'e&!%te'% $. +. o0e an 8bit immediate data to % register. o0e an 8bit immediate data to 2 register.

-. %dd accumulator and 2 register without carry .. Store the %ccumulator content to memory location 800$h &. Stop the program.

PROGRAM:

Method I: I Addre ss 9000 9001 9002 9003 9004 900) 900 9007

ed!"te "dd!t!o# Mnemonic s MVI A, 14H Opcode 3E 14 ADI 27H C 27 &'A 9000H 32 *0 90 +&'3 D, &to- t%e -rogram &tore t%e A!!"m"#ator !ontent to memor( #o!ation 9000% Add a!!"m"#ator $it% an immediate data 27H Comments Move an 8bit immediate data to A register

Label

Method II: Add!t!o# $%!#& 'e&!%te'% Addre ss 9000 9001 9002 9003 9004 900) 900 9007 9008 +&'3 ADD . &'A 9000H MVI ., 27H Label Mnemonic s MVI A, 14H Opcode 3E 14 0 27 80 32 *0 90 D, &to- t%e -rogram &tore t%e A!!"m"#ator !ontent to memor( #o!ation 9000% %dd accumulator and 2 register without carry Move an 8bit immediate data to C register Comments Move an 8bit immediate data to A register

CONCLUSION: E3ecuted and 0eri"ied output o" the program "or addition o" two 8bit numbers without carry.

E(" )*e: %4 $.h 5 2 4+1h %62 4 $.h 6+1h

$.h

000$ 0$00 6

+1h

00$0 0$$$

777777777777777777777777

00$$ $0$$

-2h

RESULT: Method I: I ed!"te "dd!t!o#

Be+o'e E(e,$t!o#: %
//

9000h

//

A+te' E(e,$t!o#: %
3.

9000h

3.%

Method II: Add!t!o# $%!#& 'e&!%te'% Be+o'e E(e,$t!o#:


// //

% 2
//

9000h

A+te' E(e,$t!o#: % 2
27% 3.%

9000h

3.%

FLOW CHART: Method I: I ed!"te "dd!t!o#

&tart
o0e an 8bit immediate data to % register. %dd accumulator with an immediate data +1h

Store the %ccumulator content to memory location 9000h

&tart

Method II: Add!t!o# $%!#& 'e&!%te'%

&tart
o0e an 8bit immediate data to % register.

o0e an 8bit immediate data to 2 register.

%dd accumulator and 2 register without carry

Store the %ccumulator content to memory location 9000h

&tart

You might also like