answersLogoWhite

0


Best Answer

In order to add 32 bit numbers in the 8085, you need to add them 8 bits at a time, tracking the carrys between each add.

LXI B,first_number

LXI H,second_number

LXI D,result

LDAX B ;first byte - no carry in

ADD M

STAX D

INX B; point to next byte

INX D

INX H

LDAX B ;second byte - carry in

ADC M ;note the ADC instead of ADD

STAX D

INX B; point to next byte

INX D

INX H

LDAX B ;third byte - carry in

ADC M

STAX D

INX B; point to next byte

INX D

INX H

LDAX B ;fourth - carry in

ADC M

STAX D

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you do addition of 32 bit numbers in 8085?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you load 32 bit data in 8085 microprocessor?

The 8085 is an 8 bit microprocessor. It cannot directly handle 32 bit data. That said, it is possible to write a routine that can handle 32 bit data, just 8 bits at a time.


32 bit multiplication using 8085 instruction set?

The 8085 does not have 32 bit capabilities, nor does it have a multiply, so to do 32 bit multiplication you would need to write a routine. There are several possibilities. One would be to setup a 64 bit result area, and a loop that scans each bit in one multiplicand, adding the second multiplicand to the result, and then shifting the result. This is simply 32 adds with 32 multiplies by two. Even though the 8085 is only an 8 bit processor, some things can be done 16 bits at a time, particularly involving the HL register.


Subtraction of two 8 bit numbers in 8085?

Mvi a, 04h 3e mvi b, 04 h 04 add b 06 sta 2050 04 hlt 80 32 50 20 76


What is higher order address of a 16 bit address?

In the 8085, the high order address is A8-A15. In the 8086/8088, the high order address is A8-A19. (For a 16-bit address, the answer is A8-A15, but the answer above reflects the chosen categories, 8085 and 8086/8088, with the 8086/8088 running in 20-bit mode.) In Windows XP, running in 32-bit mode, the high order address is A8-A31, a 32 bit address.


Is data bus the same as data width?

Not necessarily. In the 8085, for instance, this is true. In the 8088, however, the processor is a 16 bit processor with an 8 bit data bus. The same is true for the 80386sx - it is a 32 bit processor on a 16 bit bus.


Which instruction consume the maximum T state in its execution?

for 8085 microprocessor CALL [32-bit address] which is (unconditional ) consumes maximum(18) T states.


What is the difference between Intel core1 and Intel core2?

The Intel 8085 is not even in the same class as the Intel Core 2. The architecture and instruction set is vastly different. The 8085 is an 8 bit machine, running on an 8-bit bus, with at most 64kb of RAM/ROM. The Core 2 is a 32/64 bit machine, running on 32/64/128 bit buses, with potentially more than 4gb of RAM/ROM. This is like comparing an original Volkswagon Beetle with an Indy Car.


Comparison between windows 16 bit 32 bit?

Most modern operating systems are either 32 bit or 64 bit but it mostly has to do with memory coding. 32bit can utilize a maximum or 4gb or RAM due to the amount of numbers it uses to identify a location on the RAM (32 numbers). 64 bit can use far more memory (over 128gb) while 16 bit can use far less (not sure of exact numbers) Anything you buy today should be at least 32bit if not 64 bit


What determines whether a microprocessor is considered an 8-bit a 16-bit or a 32-bit device?

The number of bits a CPU uses to represent integer numbers (as opposed to floating point numbers or memory addresses) is often called "register width", "word size", "bit width", "data path width", or "integer precision". This number is often considered one of the most important characteristics of a CPU. Most CPUs are 8 bit CPUs. An 8 bit CPU -- i.e., a CPU where each register holds 8 bits -- typically has a 8 bit data bus and a 16 bit address bus. One of the first 32 bit CPUs -- the MC68008 -- had registers that held 32 bits, a 20 bit address bus, and an 8 bit data bus. Some popular 32 bit CPUs -- i.e., CPUs with registers that hold 32 bits -- had a 32 bit data bus and a 24 bit address bus.


How many decimal places in a 32 bit word?

The maximum value represented in a 32-bit unsigned word is 232-1 = 4,294,967,295, so you can represent all numbers with 9 decimal places and some numbers with 10 decimal places in 32-bits. log(232-1) = 9.632959861 is the true answer.


Is 32 a prime number?

Not Prime32 is not a prime number. In addition to 1 and 32, 2 and some other numbers will divide into it evenly. In order to be prime, a number must be divisible only by 1 and itself. Because all even numbers are divisible by 2, all even numbers except 2 are composite numbers.32 is NOT a prime number.


16 bit multiplication using 8085 instruction set?

Since the 8080/8085 is an 8 bit computer, 16 bit multiplication must be done in pieces. Its the same concept as doing long hand decimal multiplication on a piece of paper. Problem is, the 8080/8085 does not have an 8 bit multiply instruction either, so you have to do successive addition. Also, since the product of two 16 bit integers could theoretically be a 32 bit result, you have to either limit the values of the input integers or you have to provide for the 32 bit case. Start by initializing a 32 bit accumulator in memory to zero, and by making copies of the two input integers. Setup a loop of 16 iterations. For each iteration, examine a bit of one of the the inputs for 1. If set, add the other input to the result. Then shift the first input one way and the other input the other way. When done, the result will be the product of the two inputs. We shift one input one way so we can examine each bit in turn. We shift the other input the other way because each bit of the first has a higher value as the partial multiplicand. (You could also rotate the result to the right, but you would need to remember to rotate it another 16 bits when done.) That was the case for unsigned integers. For signed integers, you use the normal rules for multiplying numbers. Record the sign of each number, and then convert it into its two's-complement positive value. Perform the multiplication as usual for the unsigned case. Then inspect the recorded signs and, if they are different, take the two's-complement of the result. Don't worry about overflow in either case. It's not possible if you provide for a 32 bit result. If, however, you want to convert the result back to 16 bit form, you have to consider overflow.