×

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

Difference between Hard Copy and Soft Copy

Hard copy: A hard copy is a printed version of a computer-generated digital document file on paper or another transparent medium. The result is physically printed on paper and is...

4 minutes read.

How to determine Which Version of Microsoft Office I'm using?

Many people who use Windows computers also use Microsoft's Office package. While it is simple to tell what version of Windows you are using just by glancing at your desktop,...

3 minutes read.

What is a Digital Assistant?

It is a voice assistant or a predictive chatbot that is programmed in such a manner that it can answer the queries of the user or can perform certain simple...

8 minutes read.

What does Alt+D do?

Computer keyboard shortcut keys play an important role in the working of any computer user. We can do anything from the mouse and keyboard, but shortcut keys provide data in...

3 minutes read.

What is a Dialog Box?

Dialog boxes are a standard computer software element that allows users to interact with the program by entering or selecting information. They often appear as small windows that can be...

5 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 Procedural language?

A procedural language is a PC programming language with many capacities, guidelines, and explanations that should be executed in a specific request to achieve a task or program. As a...

10 minutes read.

What is a TAB stop?

The place where the cursor stops after pressing the Tab key is known as a tab stop. The carriage moves to the next tab stop when you click the tab...

3 minutes read.

What is Barcode Reader?

A barcode reader is an optical scanner and handheld or stationary input device, also known as a price scanner or point-of-sale (POS). It is an input device because it brings...

5 minutes read.

What is a Loosely Typed Language?

Every Programming language can be classified into Strongly and Loosely/Weakly typed. This type defines the strictness of the programming language, and each of these types has its own advantages and...

4 minutes read.

How to fix the "no input signal" error message?

How to fix the "no input signal" error message If the computer monitor shows the error message, which is "No input Signal," try to troubleshoot the operation by following: The computer is...

4 minutes read.

What is a Web Browser?

Web browser is a powerful software that enables the user to efficiently access the world wide web. It allows the user to access the data and information available on the...

7 minutes read.

Difference between Website and Webpage

Website A website is a collection of attached web pages, typically supplied from a single web domain, accessible via the Internet. A website is hosted on a computer system known as...

6 minutes read.

What is Operating System?

Operating System An operating system is an interface between a user and computer hardware. The operating system's main aim is to provide a suitable environment to a user so that a...

11 minutes read.

What is a Processing Device?

The computer receives input from input devices such as the keyboard, joystick, and scanner; then it goes through an intermediate stage; here, it manipulates the data and sends it to...

4 minutes read.

How to install a computer processor

Installing a CPU is much simpler than many other steps in the PC-building process. There is no need to worry that you will make a mistake because we will walk...

6 minutes read.

What is Analog Monitor?

Analog monitors are primitive color monitors that were popularly used as television screens. The monitors were developed using cathode ray tubes, which were quite big. They were designed in such...

4 minutes read.

Difference between Desktop and Laptop

What is Desktop? A Desktop Computer is designed for steady use at a particular location near a desk due to its huge size and power requirement. It uses devices for...

7 minutes read.

What is a Taskbar?

A taskbar is a graphical user interface component that serves several functions. Usually, a list of the running apps is displayed on it. The taskbar's arrangement and specific appearance vary...

4 minutes read.

Types of Network

“The computer network is a set of computers connected to share resources.”An internet itself can be considered the computer network. In computer networks, the computing devices exchange the data with each...

3 minutes read.