The Beginning
Remember!
- Can follow any book that covers syllabus
- Don’t follow websites until they ain’t trusted
Table of Content
1. Topics:
- Information & Data
- Analog & Digital System
- Bits, Bytes & Bit Patterns
- Numeral Systems
- Data Encoding
2. Prerequisites:
- Basic Maths
Information & Data
Information: A fact/piece of knowledge about real world
Data: Representation of Information in a format that can be stored, processed by the computers
The data hava no meaning on its own, alone!
eg.:
- A credit card number or someone’s name is a piece of an information
- When Credit Card no. or name is used for some specific purpose, it becomes data (as here the data element are stored on the Credit Card using magnetically charged particles)
Information can be:
- Encoded
- Quantified
Encoding
Converting information into Data
Quantifiable Info:
- Continuous:
- Can go infinite
- Can be fractional, too
- Associates with Physical Measurement
- eg.: height, weight
- Discrete:
- These are finite, i.e. countable
- Non-Fractional (integers only)
- Associates with Physical Measurement
- eg.: number of days in a month
Analog & Digital System
1. Analog
- Encodes real world info as continuous
- eg.: Conversion of song into continuously varying electrical signal by mic
- Operates on Continuous data
- eg.: Amplifier - amplifies and sends the signal to the speaker
2. Digital
- Encodes real world info (both continuous & discrete) into Discrete data
- Operates on Discrete data
- Digital system preferred over Analog
- Modern Computer are all work on it
Bits, Bytes & Bit-Patterns
Bits:
The term Bit comes from Binary Digit.
As it’s understood that a binary itself deals with two. Hence, there is only the scope of either of the 2 values, i.e. zero (0) & one (1).
Hence formally, a 0 or 1 is considered as a bit in the binary number system. Usually we represent a the term bit by a lower case ‘b’ (b).
Sometimes these values also represent ‘True & False’, or ‘On & Off’!
A group of 4 such bits is termed as a Nibble.
Byte:
A group of 2-nibbles or 8-bits is called a Byte. It is represented by an upper case ‘b’ (B).
Bit-Strings or Bit-Patterns:
A sequence of bits can be used to represent different numbers or data. To do so, we often group the different number of the bits.
Here a few terms in the the set of bits of different length:
210 = 1,024
Data Measurement | Size |
---|---|
1 Bit | Single Binary Digit (1 or 0) |
1 Byte | 8 bits |
1 Kilobyte (KB) | 1,024 Bytes |
1 Megabyte (MB) | 1,024 Kilobytes |
1 Gigabyte (GB) | 1,024 Megabytes |
1 Terabyte (TB) | 1,024 Gigabytes |
1 Petabyte (PB) | 1,024 Terabytes |
1 Exabyte (EB) | 1,024 Petabytes |
Numeral Systems
There are so many ways to represent the data numerically that are known as Numaral Systems. For eg.: Decimal, Binary, Roman etc…
Roman: I, II, III, IV ….
Decimal: {0,1,2,3,4,5,6,7,8,9}
Binary: {0,1}
Octal: {0,1,2,3,4,5,6,7}
Hexadecimal: {0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F} …
We use different sets of collection of bits to represent it as a different number system eg.:
- the binary number system can only accommodate 21 = 2 unique values i.e. zero (0) & one (1).
- the octal number system can accommodate 23 = 8 unique values, i.e. ranging between 0-7 i.e. {000, 111}.
- the hexadecimal number system can accommodate 24 = 16 unique values, i.e. ranging between 0-F i.e. {0000, 1111}.
Positional Numeral System
A positional (numeral) system is a system for representation of numbers by an ordered set of numeral symbols (called digits) in which the value of a numeral symbol depends on its position. For each position a unique symbol or a limited set of symbols is used.
Conversion
We are often interested to convert the values from one to another number system. The above mentioned formula can be used to convert the them. These conversions can be for the following types:
- Binary to Decimal
- Binary to Octal
- Binary to Hex
- Decimal to Binary
- Hex to Binary etc..
Covnersion of Real Number
Example of bin to dec REAL number conversion
eg.: 42.31 = 2x100 + 4x101 + 3x10-1 + 1x10-2
Data Encoding
The different formant of data is needed to be encoded ultimately in either of the 0 & 1. The data can be of various types as well. So, mostly we have to deal with following encodings:
Character Encoding
Color Encoding
There are basically 4 main colours whose intensity can lead to all the different shades.
Image Encoding
Generally the images are classified into 4 types based on their shades. Main three are given below:
a) Black and White (#00 or #ff)
b) Gray Scale (#00 to #ff)
c) Coloured (#000000 or #ffffff)
Sound Encoding
Some Other Common Issues
We deal with some other issues too, while converting the data from one form to another. As -
Approximation & Precision
- These are used when the calculation does not end up with any significant result.
Errors
- Overflow:
When the resultant bit-size exceeds the length accommodated
eg.: 1 + 255 to store in a 8-bit num. - Underflow:
When the resultant bit-size is too small to fit into the length allowed
eg.: 0.001 / 255