## Definition of Binary code

As I said before that now a days all programs are high language and we need a software to translate them to computer language or " Binary Language " so now i am going to explain what a Binary Language is :

### Introduction

All data in a computer system consists of binary information. Binary means there are only two possible values: zero and one.

Computer software translates between binary information and the information you actually work with on a computer, such as decimal numbers, texts, photos, sound and video.

Binary information is sometimes also referred to "machine language" since it represents the most fundamental level of information stored in a computer system.

At a physical level, the zero and ones are stored in the central processing unit of a computer system using transistors.

A transistor is a semiconductor device used to amplify and switch electronic signals and electrical power. It is composed of semiconductor material with at least three terminals for connection to an external circuit.

it means If a current passes through the transistor (the switch is closed), this represents a one (1). If a current doesn't pass through (the switch is open), this represents a zero (0).

No matter where your data is stored, all digital data at the most fundamental level consists of zeros and ones. In order to make you understand of this binary information, a Binary notation method is needed.

### Binary Notation :

Each binary digit is known for short as a bit. One bit can only be used to represent two different values: 0 and 1. To represent more than two values, we need to use multiple bits.

in general (n) bits can be used to 2 express (n) different values.

Example of a standard binary Code

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

0 | 0 |

1 | 1 |

2 | 10 |

3 | 11 |

4 | 100 |

5 | 101 |

6 | 110 |

7 | 111 |

8 | 1000 |

9 | 1001 |

10 | 1010 |

**Binary codes for Decimal numbers 0 to 10**

The same logic used to represent numbers can be used to represent text.

What we need is a coding scheme, similar to the binary notation example for the numbers zero to ten. How many characters do we need to represent text? The English language includes 26 letters.

Upper and lower case have to be treated separately, so that makes 52 unique characters. We also need characters to represent punctuation, numeric digits and special characters. A basic set may only need about 100 characters or so, very much like the keys on a keyboard, but what about different languages that use a different script? All the characters we want to represent are known as a character set. Several standard character sets have been developed over the years, including ASCII and Unicode

#### Translation into Binary Language :

####
- Procedure :

- To translate a decimal number into binary form,
1. Start writing numbers from the right side. Start from "1" and multiply each digit by "2" to get the next number.

2. Write “1” under all those numbers whose sum is equal to the given number. Then write “0” under the rest of numbers.

Example : Translation of 9 into Binary form

2. Write “1” under all those numbers whose sum is equal to the given number. Then write “0” under the rest of numbers.

### Units for Binary Data

- Bit : A single binary digit is called bit. i.e. 1 or 0.

####
- Nibble : Collection of four bits in called nibble.

- Byte : Collection of eight bits is called byte.

### Unit Conversion

- To convert Bits into Bytes , divide number of bits by 8

i.e. 64 Bits = 8 Bytes | 64/8 = 8 |
---|

- To convert Bytes into Bits , multiply number of Bytes by 8.

i.e. 3 Bytes = 24 Bits | 3*8 = 24 |
---|

### Bigger Units

1 Kilo Byte = 1024 Bytes |
---|

1 Mega Byte = 1024 Kilo Bytes |

1 Giga Byte = 1024 Mega Bytes |

1 Terra Byte = 1024 Giga Bytes |

ConversionConversion EmoticonEmoticon