answersLogoWhite

0

How do you convert ASCII to BCD?

Updated: 10/25/2022
User Avatar

Wiki User

11y ago

Best Answer

void main ()

{

unsigned char hrs,mins,secs;

char ch1, ch2;

puts("\nEnter the hours to update: ");

ch1=getche();

ch2=getch();

hrs = ASCIItoBCD(ch1, ch2);

puts("\nEnter the minutes to update: ");

ch1=getche();

ch2=getch();

mins = ASCIItoBCD(ch1, ch2);

puts("\nEnter the seconds to update: ");

ch1=getche();

ch2=getch();

secs = ASCIItoBCD(ch1, ch2);

*tm = 0;

_CH = hrs;

_CL=mins;

_DH= secs;

_DL=0;

_AH =3;

geninterrupt(0x1a);

puts("Time Updated");

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert ASCII to BCD?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is 47 in ASCII and BCD?

the 0x47 in ascii means 'G'. the 0x47 in BCD means ascii 0x34 and 0x37 that is '3' and '4'. Regards


How do you convert bcd to ascii hex code?

Multiply by 16. ANSWER: The answer is bcd 11 = 3 111 = 7 1111 i= F 01111 =E and so foirth


How do you show number fortyseven in ASCII?

47 in BCD & ASCII


How do you convert BCD to decimal?

explain decimal to BCD encoder


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.


Write a program to convert a 2 digit BCD number into hexadecimal number?

Write a program to convert a 2-digit BCD number into hexadecimal


Convert 01011101101 to bcd?

12


How will bcd convert into 7segment display?

BCD can be converted into 7segment display by using an encoder.


2 Write a program to convert a 2-digit BCD number into hexadecimal?

WRITE A PROGRAM TO CONVERT A 2-DIGIT bcd NUMBER INTO HEXADECIMAL


Convert string have a nice day to equivalent ascii code include spaces between words in the resultant ascii?

Convert string have a nice day to equivalent ascii code include spaces between words in the resultant ascii?


How do you convert binary number to bcd number on paper?

Example Binary 00111000 Convert to Decimal 56 Convert to BCD by using groups of four binary numbers for each digit 5 6 0101 0110


What is a function used to convert ASCII to integer?

atoi