0% found this document useful (0 votes)
272 views16 pages

Aim: To Perform 8-Bit and 16-Bit Arithmetic Operations Tool Used

The document describes performing 8-bit and 16-bit arithmetic operations like addition, subtraction, multiplication, and division using MASM assembler. It includes the algorithms, programs, sample inputs and outputs, and results for each operation using 8-bit and 16-bit registers. The operations are tested on different values loaded into the registers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
272 views16 pages

Aim: To Perform 8-Bit and 16-Bit Arithmetic Operations Tool Used

The document describes performing 8-bit and 16-bit arithmetic operations like addition, subtraction, multiplication, and division using MASM assembler. It includes the algorithms, programs, sample inputs and outputs, and results for each operation using 8-bit and 16-bit registers. The operations are tested on different values loaded into the registers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Register No.

: 20BCE1477 Name: RAMINEDI SANTHOSH

Date: 12/01/2022 Exp: 1 Arithmetic operations 8-bit and 16-bit

Aim:

To perform 8-bit and 16-bit Arithmetic operations

Tool Used:

Assembler - MASM 611

Algorithm:

8-bit Addition
1. Loading values into AL and BL (8-bit registers)
2. Adding AL and BL register values and storing result in AL register
3. Code ends

Program:

8-bit Addition

Sample Input:

8-bit Addition
Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

AL register contains value of 13H


BL register contains value of 07H

Sample Output:

8-bit Addition
Output is stored in AL register contains value of 1AH

Register/ Memory Contents for I/O and Snapshot of the Output:

8-bit Addition

Result:

Addition Operation of 8-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

16-bit Addition
1. Loading values into AX and BX (16-bit registers)
2. Adding AX and BX register values and storing result in AX register
3. Code ends

Program:

16-bit Addition

Sample Input:

16-bit Addition
AX register contains value of 00AAH
BX register contains value of 01EBH

Sample Output:

16-bit Addition
Output is stored in AX register contains value of 0295AH

Register/ Memory Contents for I/O and Snapshot of the Output:


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

16-bit Addition

Result:

Addition Operation of 16-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

8-bit Subtraction
1. Loading values into AL and BL (8-bit registers)
2. Subtracting BL from AL register values and storing result in AL register
3. Code ends

Program:

8-bit Subtraction

Sample Input:

8-bit Subtraction
AL register contains value of 13H
BL register contains value of 07H

Sample Output:

8-bit Subtraction
Output is stored in AL register contains value of 0CH
Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Register/ Memory Contents for I/O and Snapshot of the Output:

8-bit Subtraction

Result:

Subtraction Operation of 8-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

16-bit Subtraction
1. Loading values into AX and BX (16-bit registers)
2. Subtracting BX from AX register values and storing result in AX register
3. Code ends

Program:

16-bit Subtraction

Sample Input:

16-bit Subtraction
AX register contains value of 0AAAH
BX register contains value of 01EBH

Sample Output:

16-bit Subtraction
Output is stored in AX register contains value of 08BFH

Register/ Memory Contents for I/O and Snapshot of the Output:


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

16-bit Subtraction

Result:

Subtraction Operation of 16-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

8-bit Multiplication
1. Loading values into AL and BL (8-bit registers)
2. Multiplying AL and BL register values and storing result in AL register
3. Code ends

Program:

8-bit Multiplication

Sample Input:

8-bit Multiplication
AL register contains value of 13H
BL register contains value of 07H

Sample Output:

8-bit Multiplication
Output is stored in AX register contains value of 85H
Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Register/ Memory Contents for I/O and Snapshot of the Output:

8-bit Multiplication

Result:

Multiplication Operation of 8-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

16-bit Multiplication
1. Loading values into AX and BX (16-bit registers)
2. Multiplying AX and BX register values and storing result in AX register
3. Code ends

Program:

16-bit Multiplication

Sample Input:

16-bit Multiplication
AX register contains value of 00AAH
BX register contains value of 001AH

Sample Output:

16-bit Multiplication
Output is stored in AX register contains value of 0295AH

Register/ Memory Contents for I/O and Snapshot of the Output:


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

16-bit Multiplication

Result:

Multiplication Operation of 16-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

8-bit Division
1. Loading values into AL and BL (8-bit registers)
2. Dividing AL by BL register values and storing quotient in AL register and remainder
in AH register
3. Code ends

Program:

8-bit Division

Sample Input:

8-bit Division
AL register contains value of 13H
BL register contains value of 07H

Sample Output:

8-bit Division
Output quotient is stored in AL register contains value of 02H and remainder is
stored in AH register contains value of 05H
Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Register/ Memory Contents for I/O and Snapshot of the Output:

8-bit Division

Result:

Division Operation of 8-bit is performed using MASM assembler.


Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Algorithm:

16-bit Division
1. Loading values into AX and BX (16-bit registers)
2. Dividing AX by BX register values and storing quotient in AL register and remainder
in AH register.
3. Code ends

Program:

16-bit Division

Sample Input:

16-bit Division
AX register contains value of 00AAH
BX register contains value of 000AH

Sample Output:

16-bit Division
Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH

Output quotient is stored in AL register contains value of 11H and remainder is


stored in AH register contains value of 00H

Register/ Memory Contents for I/O and Snapshot of the Output:

16-bit Division

Result:

Division Operation of 16-bit is performed using MASM assembler.

You might also like