Quick links
Latest articles
Internship
Members
New...
Algorithms
Discrete Mathematics
Big data
Languages
C
C++
C++ STL
Java
Data Structure
C#.Net
Android
Kotlin
SQL
Web
PHP
Python
JavaScript
CSS
Ajax
Node.js
Web prog.
Programs
C
C++
DS
Java
C#
Python
Aptitude
C
C++
Java
DBMS
Interview
C
Embedded C
Java
SEO
HR
CS Subjects
CS Basics
O.S.
Networks
DBMS
Embedded Systems
Cloud Computing
Machine learning
CS Organizations
Linux
DOS
More...
Articles
Puzzles
News/Updates

Home » Embedded Systems

Find Square Root of a number | 8086 Microprocessor



Here, we are going to learn how to find square root of a number using 8086 Microprocessor?
Submitted by Akash Kumar, on November 08, 2018

Problem: Write a program in 8086 microprocessor to find square root of a number.

Algorithm:

  1. Move the firstnumber in register AX.
  2. Assign the value of register CX as 0000 and register BX as FFFF.
  3. Add 0002 to value of register BX.
  4. Update the value of register CX by one.
  5. Subtract the content of register AX and BX.
  6. If the value of zero flag is not set then goto step 3 otherwise goto next step.
  7. Store the value of CX to memory.
  8. Terminate the program.

Program:

    MOV     AX, [0600]
    MOV     CX, 0000
    MOV     BX, FFFF
    *** ADD BX, 02
    INC     CX
    SUB     AX, BX
    JNZ ***
    MOV     [0602], CX
    HLT

Observation:

    INPUT:
    0600:19
    0601:00

    OUTPUT:
    0602:05

Hence, we successfully calculated the square root of a number using 8086 Microprocessor.






Quick links:
C FAQ(s) C Advance programs C/C++ Tips & Tricks Puzzles JavaScript CSS Python Linux Commands PHP Android Articles More...

Featured post:
Introduction to Linux (Its modes, Safety, Most popular Applications)
Linux Best Distribution Software (Distros) of 2018

Was this page helpful? Please share with your friends...

Are you a blogger? Join our Blogging forum.

Comments and Discussions



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates



© https://www.includehelp.com (2015-2018), Some rights reserved.