Text to ASCII is the process of converting each character of the text into its corresponding ASCII code (either in decimal or binary). ASCII (American Standard Code for Information Interchange) is a standard encoding system where each character (letters, digits, punctuation marks, etc.) is represented by a unique numeric value.
Steps to Convert Text to ASCII:
Take each character in the text.
Find the ASCII value for each character.
This can be in decimal (standard form) or binary (the binary representation of the decimal value).
Example:
Let's convert the word "Hi" into its ASCII values (both in decimal and binary).
Step 1: Get the ASCII values of each character in decimal.
'H' → ASCII value 72
'i' → ASCII value 105
Step 2: Convert the ASCII values into binary.
72 → binary: 01001000
105 → binary: 01101001
Final Answer:
Text "Hi" in ASCII (decimal): 72 105
Text "Hi" in ASCII (binary): 01001000 01101001
Quick Guide:
Each character in text corresponds to a unique ASCII code.
For decimal ASCII: Directly use the ASCII table to find the decimal value.
For binary ASCII: Convert the decimal ASCII values to binary.