×

What is Binary?

There are four types of the number system in computer applications through which we represent the different numbers.
Before moving to binary numbers, let's discuss the rest of the number system and the type of number system we include in the computer application.
The first one is the hexadecimal number system, and this type of number system includes the base value equal to 16. Sixteen different symbols have been assigned in this number system.
The second one is the decimal number system. The base value of this number system is 10. We have been using the number system since our childhood to count something or solve mathematics in our classes. The third one is the octal number system. In this number system, you will find the base value is 8. In this number system, you will find eight different symbols. And those symbols are from 0 to 7.
And, the fourth one is the binary number system, which we are going to read in this article:
A binary number in a binary number system or base 2 number system called binary. In Binary System, we define the symbol as 1 and 0. The propositional position of the binary number system is 2.
Computers use this numerical system to store and retrieve data such as numbers, music, pictures, words, etc. The term 'bit,' which refers to the smallest digital technology unit, is derived from the words 'BInary digiT.' Today, programmers utilize the hexadecimal or base-16 number system to concisely express binary data.   Because it is easier for computers to convert from binary to hex and vice versa, whereas doing so with the generally used decimal number system is far more difficult.

A brief history of the binary number

Gottfried Leibniz and a few more mathematicians previously described the contemporary binary numbers in Europe in the 16th and 17th centuries. The I Ching, also known as the Masterpiece of Changes or the Book of Modifications, is one of China's earliest books, dating from the 9th century BCE. The notion of Yin-Yang is used in the same work to depict the interconnection of forces in the world.

Ancient Egyptian scribes employed something called Horus-Eye fractions, which was one of two methods the Egyptians used to depict fractions, even before these advancements in China.

Fairly close to home, in the 2nd century BC, An Indian intellectual, Pingala, creator of Chhandahshastra, was also renowned as one of the early developers of the binary system.

The distinctions between the current binary system and Pingala's creation are that the latter's system begins with one rather than zero. The binary interpretations expand to the right rather than the left, as in the contemporary version.

Representation in binary

We can categorize binary numbers in two forms, the first one is signed number, and the second is an unsigned number

  1. Unsigned Numbers
    Only the amount of the number is included in unsigned numbers. They don't have any identification. All unsigned binary values are, therefore, positive. Using a positive sign before a number, like in the decimal number, is optional for portraying positive number. Consequently, zero and all those who sign is not positive can be considered unsigned numbers.
  2. Signed Numbers
    In a signed integer, you will find the expected value of a number. The symbol is placed in front of the phone number in most cases. That’s why, for positive integers, we must identify the positive sign, and for negative values, we must examine the negative sign. As a result, if an appropriate sign is put next to the integer, it can be regarded as a signed number.

Representation of Un-Signed Binary Numbers

The size of a value is recorded in the bits of an unsigned binary value. If an unsigned binary number has 'N' bits, then all of the N bits indicate the number's value because it lacks a sign bit.

Example:

Think about the value 23 in decimal form. 10111 is the binary equal of this number. This is how an unsigned binary number is represented.

10111=23

It has seven bits. The value of the integer 23 is indicated by these 5 bits.

Representation of Signed Binary Numbers

In signed binary numbers, Most Significant Bit MSB is used to denote the sign of the numbers.

Representation of Signed Binary Numbers

Placing a '0' in the signed binary shows a positive sign. In the same way, putting a '1' in the signed binary represents a negative sign.

Signed binary integers can be represented in three ways:

  • Sign-magnitude form
  • 1's complement form, and
  • 2's complement form.

A positive number has the same meaning in all three types. However, only the depiction of negative numbers in each format will vary.

Sign-Magnitude form

The MSB is often used to describe the number's sign, while the remaining bits indicate the number's value. As a result, add the sign bit to the unsigned binary number's leftmost side. This notation is analogous to the format of signed decimal numbers.

Consider the number -23, which is a negative decimal number. This integer has a magnitude of 23. The unsigned binary value of the number 23 is 10111. It consists of 5 bits. All of these bits represent the value.

Assume the sign bit as one on the leftmost side of the magnitude because the provided integer is negative.

-2310 = 1101112

As a result, -23's sign-magnitude equivalent is 110111.

1's complement form

Accompanying all the bits of a signed binary number yields the 1's complement of a value. As a result, when a positive number is multiplied by 1, the result is a negative value. In the same way, adding 1 to a negative integer produces a positive number.

If you multiply a binary number by two times the 1's complement, you will receive the original signed binary value.

Example

Assume the negative decimal value -23. The value of this number is 23. The signed binary representation of 23 comes out to be equal to 10111.

It consists of 5 bits. This number's MSB is zero, indicating an excellent value. One is the complement of zero and vice versa. To get the negative number, replace zeros with ones and ones with zeros.

-2310 = 010002

Therefore, the 1's complement of 2310 is 010002.

2's complement form

A binary number's 2's complement is obtained by adding one to the 1's complement of a signed binary number. As a result, when a positive value is multiplied by two, the result is a negative number. Similarly, when a negative value is multiplied by two, the result is an excellent value.

If you multiply a binary number by two times its 2's complement, you will receive the duly signed binary number.

Example:

Assume the negative decimal value is -23.

Then the value of 23's 1's complement of (23)10 is (01000)2

2's compliment of 2310 = 1's compliment of 2310 + 1.

= 01000 + 1

= 01001

Therefore, the 2's complement of 2310 is 010012.


Related Topics

What is a Program

A program can be defined as an application used to perform a specific function. It constitutes stepwise instructions to perform a dedicated task. Multiple programs working together can form a...

4 minutes read.

What is Safe Mode?

There are various operating systems that provide multiple boot options to the users. Safe mode is also one of the boot options available for the users. It is very different...

6 minutes read.

Generation of Computer

History of computer The abacus was initially used for the mathematical tasks in the history of the computer. It is also known as counting frame and a calculating tool that was used in Europe, China,...

6 minutes read.

Computer Hardware

The computer hardware includes the physical parts or components of the computer, such as to monitor, keyboard, mouse, motherboard, etc. We need software for the instructions that can be stored...

5 minutes read.

How to fix problems in Windows after installing new software

Sometimes users face problems after installing new software in the windows operating system. Go along with the below steps to correct and fix them. Uninstall the software program or reinstall it If...

4 minutes read.

What does Alt+E do?

Computer keyboard shortcut keys play a very important role in every computer user. We can do anything from the mouse and keyboard, but shortcut keys provide data in a time-efficient...

3 minutes read.

Parts of Computers Names, Definitions and Images

Computer: A computer is an electronic device, which is made up of using various hardware. The computer processes data, performs calculations, and communicates with other devices and systems. Hardware refers...

14 minutes read.

What is Clipboard?

The Clipboard is a particular location in computer, phone, or tablet memory where you can store copied text or other data. It is also known as paste-board. When you copy...

6 minutes read.

What is a Desktop?

Any of the following may be referred to as a desktop: 1. A desktop computer or system unit is referred to as a desktop. 2. The Desktop is the main location to...

6 minutes read.

What is SAN?

A storage area network, sometimes known as SAN, is a specialized, quick network that provides network access to storage devices. Hosts, switches, storage components, and storage devices make up standard...

7 minutes read.

ROM and its Types

What is ROM? ROM stands for “Read Only Memory”. It is a type of non-volatile memory that is used to store data that cannot be modified or written to by a...

4 minutes read.

What is a Silicon Chip?

A silicon chip is a microscopic silicon component found inside computers. It has electronic circuits holding much data or conducting logical or mathematical computations. An integrated circuit comprised mostly of...

4 minutes read.

What is Video Card?

It is a component in the personal computer that is used to connect with the motherboard in the CPU. It is also called the graphic card or video control; as...

13 minutes read.

How to open the Windows My Documents or Documents folder

Documents or My Documents (known in earlier versions of Windows such as Windows XP) is basically an in-built directory provided by Microsoft Windows. This is a very valuable directory that...

5 minutes read.

What is an Output Device?

The equipment that accepts input or data from a computer commonly for display, projection, or physical reproduction. For example, the image depicts an inkjet printer, an output device that creates...

6 minutes read.

What is Printer?

Printer is a hardware equipment that can be connected to a system. It can take textual and graphical content from the system and display it on a medium. It allows...

10 minutes read.

What is a Calculator?

What is a Calculator? A calculator is a manufactured device that enables us to solve complex mathematics easily. It helps to save a lot of time and energy as well. They...

3 minutes read.

What is HDMI: High Definition Multimedia Interface

HDMI is one of the most frequently used audio/video interfaces, which is a connector and cable that can send high-definition, high-bandwidth audio and video streams between devices. It stands for...

3 minutes read.

Open Source Programs vs Closed Source Programs

What is an Open Source Program? The "open source program" means the computer programs that are accessible to the general public. To make the software better, users can alter, examine, and...

4 minutes read.

What is an Octothorpe?

Octothorpe is a number sign with other names and is referred to as a hash mark or pound sign. Octothorpe is known to everyone with the hashtags that are often...

2 minutes read.