Welcome Back Programmers, Till now in every tutorial we have worked with different types of values, like integers,floats,Strings and much more. As we know Strings are nothing but sequence of characters, but ever thought how are computer may understand all these characters? How the computer so ghastly performs operations on numbers and other type of Data? In this tutorial we are going to learn about the system of Bits and the different operators that are used to perform operations on them.
What are Bits?
Since we know that computer cannot understand the human-readable language. So it converts the data into binary form, i.e in 1's and 0's. Each single digit in the binary number is known as Bit. The number 7 when converted to binary number gives 1010110, here every single digit is a bit. 1 bit is equal to 1/8th of a byte. Or we can say a Byte is equal to 8 bits. In-fact bit is the smallest unit of digital information.
Concluding about bits, Bits are the basic unit of information in computing and digital communication. It represents a logical state with one of two possible values, i.e either 1 or 0.
* A bit actually consists of 8 digits, like 10100011 or 00001111, but here in some examples we'll consider only first 4 bits from every number, like as 5 = 0000 0101 but here in some cases we'll take 5 = 0101.