Data Representation:

It is necessary to understand in simple terms what a computer is, how it works, and what it can do for us. There is no magic in computers, and computers are not the confusing, complex, technical machines that they are made out to be. In fact, the computer is a remarkably simple machine. Almost every part in a computer has only one job to do—that is, to say "yes" or "no" when the situation arises. No matter what kind of advanced components a computer uses, each decision it makes comes down to whether a switch is on or off. But to understand this simple reasoning, which is the building block of a computer, let us first understand what a computer is, its basic functions, and its architecture.

Binary System- BITS and BYTES

The computer’s storage capacity is measured in bytes or multiples of bytes like Kilobytes, Megabytes, and Terabytes.

Size Conversions

Equivalent Size
1 Byte 8 Bits
1 Kilobyte (KB) 1024 Bytes
1 Megabyte (MB) 1024 Kilobytes
1 Gigabyte (GB) 1024 Megabytes
1 Terabyte (TB) 1024 Gigabytes
1 Petabyte (PB) 1024 Terabytes
1 Exabyte (EB) 1024 Petabytes

Standard codes – ASCII and EBCSDIC

The code for each character has been standardized. One such standardized code, which is used in microcomputers. ASCII stands for America Standard code for Information Interchange. The ASCII code uses 7 bits to represent a character and the extended ASCII code uses 8 bits to represent a character.

Another standardized code. Which is used in the mainframe computers? EBCDIC stands for extended Binary Coded Decimal Interchange Code. These codes use 8 bits to represent a character.

Decimal to Binary Conversion in Mathematics

To convert a decimal number to binary in mathematics:

  1. Divide the decimal number by 2.
  2. Write down the remainder.
  3. Continue dividing the quotient by 2 and writing down the remainders until the quotient becomes 0.
  4. The binary representation of the decimal number is the sequence of remainders read from bottom to top.

For example, to convert the decimal number 77 to binary:

Reading the remainders from bottom to top gives the binary representation 1001101.

Binary to Decimal Conversion

Consider the following Banary Number: 1 0 0 1 1 0 1

The right most bit is called the least significant bit, the left most bit is called the most significant bit. The least significant number is multuplipled by 2 raised to the power of 0, the next number is multiplied is mulptiplied by 2 raised to the power of 1 and so on. In order to find the decimal value of the binary number, 1001101

To convert a binary number to a decimal number:

  1. Start from the right-most digit (the least significant bit).
  2. Each digit's value is determined by its position from right to left, with positions being powers of 2 (2^0, 2^1, 2^2, and so on).
  3. Multiply each digit by its corresponding power of 2 and add up the results.

Example: Binary number 1001101

Starting from the right:

Add the results: 1 + 0 + 4 + 8 + 0 + 0 + 64 = 77

So, the binary number 1001101 is equivalent to the decimal number 77s.