Binary alphabet – The Alphabet Letters in Binary

ASCII (American Standard Code for Information Interchange) is a character encoding standard for electronic communication. ASCII codes represent text in computers. Most of the modern character-encoding schemes are based on ASCII but they support lot of additional characters.

 

Ascii Characters Table

In the table below there are printable characters (code 20hex – 7Ehex) in binary and ASCII code. Printable characters represent letters, digits, punctuation marks, and miscellaneous symbols. There are 95 printable characters.

BinaryASCII codeHexCharacter
010 00003220 space
010 00013321!
010 00103422"
010 00113523#
010 01003624$
010 01013725%
010 01103826&
010 01113927'
010 10004028(
010 10014129)
010 1010422A*
010 1011432B+
010 1100442C,
010 1101452D-
010 1110462E.
010 1111472F/
011 000048300
011 000149311
011 001050322
011 001151333
011 010052344
011 010153355
011 011054366
011 011155377
011 100056388
011 100157399
011 1010583A:
011 1011593B;
011 1100603C<
011 1101613D=
011 1110623E>
011 1111633F?
100 00006440@
100 00016541A
100 00106642B
100 00116743C
100 01006844D
100 01016945E
100 01107046F
100 01117147G
100 10007248H
100 10017349I
100 1010744AJ
100 1011754BK
100 1100764CL
100 1101774DM
100 1110784EN
100 1111794FO
101 00008050P
101 00018151Q
101 00108252R
101 00118353S
101 01008454T
101 01018555U
101 01108656V
101 01118757W
101 10008858X
101 10018959Y
101 1010905AZ
101 1011915B[
101 1100925C\
101 1101935D]
101 1110945E^
101 1111955F_
110 00009660`
110 00019761a
110 00109862b
110 00119963c
110 010010064d
110 010110165e
110 011010266f
110 011110367g
110 100010468h
110 100110569i
110 10101066Aj
110 10111076Bk
110 11001086Cl
110 11011096Dm
110 11101106En
110 11111116Fo
111 000011270p
111 000111371q
111 001011472r
111 001111573s
111 010011674t
111 010111775u
111 011011876v
111 011111977w
111 100012078x
111 100112179y
111 10101227Az
111 10111237B{
111 11001247C|
111 11011257D}
111 11101267E~

Binary to Decimal in Python, C++, Java, Php

You can find here how to convert from Binary to Decimal in C++, Java, Python, Php and so on. If you want to convert from bin to dec, you can use our converter.

How to convert

Java

Function public static int parseInt(String s, int radix) throws NumberFormatException converts string value  s  to int value with the radix in Integer class [ref]

Bin to dec in Java

int decimalValue = Integer.parseInt("110010", 2);
Output: 50

PHP

Function bindec ( string $binary_string ) : numberreturns the decimal equivalent of the binary number represented by the binary_string argument [ref].

Bin to dec in PHP

<?php
echo bindec('111');
?>
Output: 7

Python 3

Function int(x, base=10)returns an integer object constructed from a number or string x with the base. [ref]

Bin to dec in Python 3

>>> int('11111111', 2)
Output: 255

 

Programs for converting bin to dec

<?php 
// PHP program to convert binary to decimal 
  
// Function to convert from bin to dec 
function binToDec($number) 
{ 
  $dec_value = 0; 
  $base = 1; 
      
  $temp = $number; 
  while ($temp) 
  { 
    $digit = $temp % 10; 
    $temp = $temp / 10; 
          
    $dec_value += $digit * $base; 
    $base = $base * 2; 
  } 
  return $dec_value; 
} 
  
echo binToDec(110110),"\n"; 
?> 

/* C++ program to convert bin to dec */
#include <iostream>
using namespace std;
int main()
{
  long bin, dec = 0, rem, num, base = 1;
  bin = 01011; 
  while (num > 0)
  {
    rem = num % 10;
    dec = dec + rem * base;
    base = base * 2;
    num = num / 10;
  }
  
  cout << "Result: " << dec << endl;
  return 0;
}