answersLogoWhite

0

.model small

.data

var1 db 25,32,49,10,81

var2 db 30 dup(0)

.code

mov ax,@data

mov ds,ax

mov cl,05h

mov dl,02h

lea si,var1

lea di,var2

l2: mov al,[si]

l1:mov ah,00h

div dl

mov [di+4],ah

dec di

cmp al,00h

jne l1

inc di

inc di

inc di

inc di

inc si

dec cl

jnz l2

mov ah,4ch

int 21

end

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Math & Arithmetic

What is role of 6 in bcd addition?

In Binary-Coded Decimal (BCD) addition, the digit 6 plays a crucial role as a threshold for determining whether a correction is needed after standard binary addition. BCD represents decimal digits using four bits, and if the sum of two BCD digits exceeds 9 (which is 1001 in binary), a correction of 6 (0110 in binary) is added to bring the result back into valid BCD range. This adjustment ensures that the resulting sum correctly represents decimal values. Thus, 6 is effectively used to convert invalid BCD results back into valid representations.


How do you find 47 in BCD?

To represent the decimal number 47 in Binary-Coded Decimal (BCD), you first separate the digits: 4 and 7. In BCD, each digit is represented by its 4-bit binary equivalent. Therefore, 4 is represented as 0100 and 7 as 0111. Combining these, 47 in BCD is expressed as 0100 0111.


What is the advantage of encoding a decimal number in BCD as compared with straight binary?

The advantage of encoding a decimal number in Binary-Coded Decimal (BCD) compared to straight binary is that BCD allows for easier human readability and manipulation of decimal numbers. Each decimal digit is represented by its own binary sequence, making it straightforward to convert between decimal and BCD without complex calculations. This is particularly useful in applications such as digital displays and calculators, where decimal output is required. Additionally, BCD can simplify certain arithmetic operations involving decimal numbers.


What is the highest number in BCD?

In Binary-Coded Decimal (BCD), each decimal digit is represented by its own four-bit binary equivalent. Since the highest decimal digit is 9, the highest number in BCD corresponds to the decimal number 9, which is represented in BCD as 1001. Thus, the highest BCD representation for a single digit is 1001. For multiple digits, the highest number would be 999, represented in BCD as 1001 1001 1001.


Why in bcd to excess 3 conversion binary valus are taken up to 9 only?

because 9 is a lucky number for bcd..............ha ha ha

Related Questions

What is the difference between binary codes and bcd codes?

In BCD each digit of a decimal number is coded as a separate 4 bit binary number between 0 and 9.For example:Decimal 12 in BCD is shown as 0001 0010 (Binary 1 and Binary 2), in Binary it is 1100.


Bcd to hex conversion using 8086 instruction?

To convert BCD (Binary-Coded Decimal) to hexadecimal using the 8086 instruction set, you can use the AAM (ASCII Adjust AX After Multiply) instruction after performing the necessary arithmetic operations. First, load the BCD value into a register (e.g., AL), then multiply it by 10 if needed to adjust for BCD format. Finally, use AAM to convert the resulting value into hexadecimal format, where the high and low nibbles of AL will represent the hexadecimal digits. Make sure to handle any values that exceed the BCD range appropriately.


Write a program in 8086 assembly language that accepts two input characters pack two characters in one word and store them in consecutive locating in a memory buffer The first address of buffer is 400?

develop and test an assembly language to convert a two digit BCD number to binary


Show the number 47 in BCD and ACSII?

In BCD it is 00100111 In Binary, which is what you mean, it is 101111


Why is BCD used in computers?

BCD is used for binary output on devices that only display decimal numbers.


What is the BCD representation of the decimal number 41 in 6-bit?

41 in decimal is 0100 0001 in BCD (this is 8 bits not 6 bits)41 in decimal is 101001 in binary (this is 6 bits, but binary not BCD)There is no 6 bit BCD representation of the decimal number 41!


How do you make BCD binary up down counter with a 4-bit adder and a register?

I wants to know the advantages of 4 Bit BCD/Binary UP/DOWN


What is Alp for multiplication of two digit BCD numbers in 8086?

Assembly language programe for multiplication


How do you explain the operation of the BCD Adder?

A BCD (Binary-Coded Decimal) Adder operates by adding two BCD digits (each represented by four bits) and producing a sum that also needs to be in BCD format. When the raw binary sum exceeds 9 (1001 in binary), a correction is applied by adding 6 (0110 in binary) to the result, which adjusts it back into the valid BCD range. The carry from this addition is then used to account for any overflow into the next higher decimal place. This process ensures that the output remains a valid BCD representation after the addition.


What are ASII and BCD how are they used?

ASCII (American Standard Code for Information Interchange) and BCD (Binary Coded Decimal) are standards for storing information in the binary sytem. ASCII is used for storing alphabetic, numeric, symbols, and control characters in 8-bit binary, and BCD is used for storing numbers 0-9 in 4-bit binary.


Difference between bcd and binary?

Binary is a base-2 numeral system that uses only two digits, 0 and 1, to represent values. Binary-Coded Decimal (BCD), on the other hand, is a form of binary encoding where each decimal digit is represented by its own group of four binary bits. For example, the decimal number 25 in binary is represented as 11001, while in BCD, it is represented as 0010 0101 (for 2 and 5). BCD is often used in digital displays and calculators to ensure accurate decimal representation.


Implementation of binary search algorithm using ASM assembler in 8086?

Hi, I hope this is useful http://www.indiastudychannel.com/projects/2748-Assembly-language-program-for-Binary-search.aspx good luck!