Found 60 Articles for 8086

8086 program to find Square Root of a number

George John
Updated on 30-Jul-2019 22:30:25

2K+ Views

In this program we will see how to find the square root of a number.Problem StatementWrite 8086 Assembly language program to find the square root of a number. The number is stored at memory offset 500. Finally store the result at memory offset 600.DiscussionTo find the square root here at first we are clearing the counter register. In each iteration we are increasing BX register by 2. At first we need BX = 0001. So we are initializing it to FFFFH, after adding 2, it will be 0001H. In each iteration the counter value is increased, and subtract the BX ... Read More

8086 program to find the factorial of a number

Chandu yadav
Updated on 30-Jul-2019 22:30:25

11K+ Views

In this program we will see how to find the factorial of a number.Problem StatementWrite 8086 Assembly language program to find the factorial of a number stored in memory offset 500. Store the result at 600 and 601 memory offset.DiscussionTo find the factorial of a number n we have to repeatedly multiply the numbers from 1 to n. We can do the same by multiplying the number and decrease it until it reaches 1. So the sequence will beIn this program we are taking the number into counter register then decrease it and multiply, If the result exceeds the range ... Read More

8086 program to find average of n numbers

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

6K+ Views

In this program we will see how to find the average of n numbers in a given series.Problem StatementWrite 8086 Assembly language program to find the average of n numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. In each ... Read More

8086 program to find sum of odd numbers in a given series

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

3K+ Views

In this program we will see how to add odd numbers in a given seriesProblem StatementWrite 8086 Assembly language program to add the odd numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. To check the number is even or ... Read More

8086 program to find sum of Even numbers in a given series

George John
Updated on 30-Jul-2019 22:30:25

1K+ Views

In this program we will see how to add even numbers in a given seriesProblem StatementWrite 8086 Assembly language program to add the even numbers stored in a given series starts from memory offset 501. The size of the series is stored at memory offset 500.DiscussionTo do this task we are initializing the Source Index (SI) register to the starting address of the series. We are also taking the series size into CL. The CL will be used as counter. To store add we are using AL register. Initially set AL to 0. To check the number is even or ... Read More

8086 program to divide a 16 bit number by an 8 bit number

Chandu yadav
Updated on 30-Jul-2019 22:30:25

11K+ Views

In this program we will see how to divide 16-bit number by an 8-bit number.Problem StatementWrite 8086 Assembly language program to divide 16-bit number stored in memory location offset 501. Divide it with 8-bit number stored in 500H. Also store result at memory offset 600.Discussiont8086 has DIV instruction to perform division. Take the 8-bit number into BL, and 16-bit number into AX. Now divide AX by BL. The result will be stored at AX.We are taking two numbers 24CF / 2D = D1InputAddressData……5002D501CF50224…… Flow Diagram Program OutputAddressData……600D1……

8086 program to multiply two 16-bit numbers

Arjun Thakur
Updated on 30-Jul-2019 22:30:25

9K+ Views

In this program we will see how to multiply two 16-bit numbers.Problem StatementWrite 8086 Assembly language program to multiply two 16-bit number stored in memory location 3000H – 3001H and 3002H – 3003H.DiscussionWe can do multiplication in 8086 with MUL instruction. For 16-bit data the result may exceed the range, the higher order 16-bit values are stored at DX register.We are taking two numbers BCAD * FE2D = 1BADAInputAddressData……3000AD3001BC30022D3003FE…… Flow Diagram Program OutputAddressData……3004693005D03006543007BB……

8086 program to multiply two 8-bit numbers

Ankith Reddy
Updated on 30-Jul-2019 22:30:25

10K+ Views

In this program we will see how to multiply two 8-bit numbers.Problem StatementWrite 8086 Assembly language program to multiply two 8-bit numbers stored in memory address offset 500 and 501.DiscussiontIn 8086 there is MUL instruction. So the task is too simple. Here we are taking the numbers from memory and after that performing the multiplication operation. As 8-bit numbers are taken, after multiplication AX (16-bit) will store the result.InputAddressData……5009950125…… Flow Diagram Program OutputAddressData……6001D60116……

8086 program to subtract two 16-bit numbers with or without borrow

George John
Updated on 30-Jul-2019 22:30:25

7K+ Views

In this program we will see how to subtract two 16-bit numbers with and without borrow.Problem StatementWrite 8086 Assembly language program to subtract two 16-bit number stored in memory location 3000H – 3001H and 3002H – 3003H.Discussion8086 is 16-bit register. We can simply take the numbers from memory to AX and BX register, then subtract them using SUB instruction. When the Borrow is present, the CY flag will be 1, so we can store borrow into memory, otherwise only store AX into memory.InputAddressData……30002D3001FE3002AD3003BC…… Flow Diagram Program OutputAddressData……300480300541300600……

8086 program to subtract two 16 bit BCD numbers

Chandu yadav
Updated on 30-Jul-2019 22:30:25

1K+ Views

In this program we will see how to subtract two 16-bit BCD numbers.Problem StatementWrite 8086 Assembly language program to subtract two 16-bit BCD numbers stored in memory offset 500H – 501H and 502H – 503H.DiscussionHere we are adding the 16-bit data byte by byte. At first we are subtracting lower byte and perform the DAS instruction, then Subtract higher bytes with borrow, and again DAS to adjust. The final result is stored at location offset 600H, and if borrow is present, it will be stored at 601H.We are taking two numbers 8523 - 7496 = 1027InputAddressData……50023501855029650374…… Flow Diagram Program OutputAddressData……600276011060200……

Advertisements