**String Functions Blog Categories**- Categories
- Conversion
- Encode – Decode
- Encryption
- Hexadecimal
- News
- Octal, Binary and Decimal
- Smartphone
- Social Network
- Web Hosting

In **computer programming**, computers only understand a binary numbering system – based on 2s. Currently, many programmers use a hexadecimal system, which is based on units of 16. Although there are many **online tools** to help with conversions, an understanding of manual ASCII to binary to hexadecimal conversions is helpful.

The first step is to understand counting in different systems. Our usual denary system uses the digits 0 – 9. Once you reach “9” you start with 10, 11, etc back to 19. Then you move on to the 20s. Binary and hexadecimal numbering systems use the same procedure, with different digits. Binary uses only the numbers 0 and 1. Usually, these are written with four digits, so 0 in denary is 0000 in binary.

Decimal | Binary |
---|---|

1 | 0001 |

2 | 0010 |

3 | 0011 |

4 | 0100 |

5 | 0101 |

6 | 0110 |

7 | 0111 |

8 | 1000 |

9 | 1001 |

10 | 1010 |

11 | 1011 |

12 | 1100 |

13 | 1101 |

14 | 1110 |

15 | 1111 |

The **hexadecimal** numbering systems uses the number 0 – 9 and A – F. They are represented by 2 numbers or letters: 00 – FF. The letter “A” is number 10, “B” is 11, and “F” is 15. Counting in hexadecimal looks like this: 00, 01, … 09, 0A, 0B, … 0F, 10, 11, … 1A, 1B, … 1F, 20, etc.

Decimal | Hexadecimal |
---|---|

1 | 1 |

2 | 2 |

3 | 3 |

4 | 4 |

5 | 5 |

6 | 6 |

7 | 7 |

8 | 8 |

9 | 9 |

10 | A |

11 | B |

12 | C |

13 | D |

14 | E |

15 | F |

Use this tool to convert decimal to hexadecimal. Try also the opposite tool to convert hex to decimal

**Converting between binary and hexadecimal** is fairly easy. A single hexadecimal number requires four binary numbers. So the binary number 0000 = hexadecimal 0, binary 0100 is hexadecimal 4, and binary 1010 is hexadecimal A.

In **computer programming**, you also need a way to incorporate letters. ASCII stands for American Standard Code for Information Interchange, and is based on the English alphabet. **ASCII string are converted to binary or hexadecimal values**, allowing words and letters to be used by computers.

The values needed to **convert ASCII string to binary or hexadecimal** are contained in tables. However, if you don’t have access to a table, you can manually convert ASCII to hex or binary by memorizing a few rules and applying basic counting rules. The numbers 0 – 9 begin with binary number 0011 0000, and hexadecimal number 30. Now, if you just remember the hexadecimal value (which is just 2 characters) you can convert to binary. The hexadecimal value “3” is 0011 binary, and “0” is 0000. Now you can count up through the ASCII number 9.

The capital letters A – Z begin with hexadecimal 41 and the small letters a – z begin with hexadecimal 61 and binary number 0110 0001. One more important character – a space – is hexadecimal 20 and binary 0010 0000.

Finally, here is an example with the **manual conversions**. To convert a string to hexadecimal, let’s take “Hi mom”, start with the “H”. “A” begins with hexadecimal value of 41, “B” is 42, …”G” is 47, and “H” is 48. Next is the letter “i”. “a” is hexadecimal 61, “b” is 62, … “h” is 68, and “i” is 69. So your first part is 48 69. Now insert the space, and the rest of the letters. Final answer: 48 69 20 6D 6F 6D

If you remember how to count, a few ASCII conversion to hex values, and a little practice, manual conversions are pretty easy.

VN:F [1.7.0_948]

Tags: ASCII, ASCII to Binary, ASCII to Hexadecimal, Binary, Binary to Hexadecimal, Conversion, Decimal, Hexadecimal, Manipulate String, Online Tools, String Function, String to Hex, Tutorial

Posted in Conversion | No Comments »

Feedback - Want to share an idea?

If you **have a question**, **noticed a problem**, want to **share an idea** or simply want to **comment this page**, fill the box below and hit the "Submit" button

String to Lowercase Converter -
String to Uppercase Converter -
String to Hex Converter

Hex to String Converter -
Reverse String Online -
String Length Function -
Html Decode Online

Html Encode Online -
Url Decode Online -
Url Encode Online -
Hex to Binary Converter

Binary to Hex Converter -
Hex to Decimal Converter -
Convert a Decimal to Hex -
Binary to Decimal Converter

Decimal to Binary Converter -
Md5 Hash Online -
Sha1 Hash Online -
Md5 Reverse Lookup

Sha1 Reverse Lookup -
Ascii to Binary Converter -
Ascii to Decimal Converter

Convert Hex to Rgb -
Convert Rgb to Hex