Professional Documents
Culture Documents
UNIT 3
Fundamentals of Computers & IT
Number System
In digital electronics, the number system is used for representing the information. There are two types of
number system:
• Use symbols such as I for 1, II for 2, III for 3, IIII for 4, IIIII for 5, etc.
• Each symbol represents the same value regardless of its position in the number.
• The symbols are simply added to find out the value of a particular number.
• It is difficult to perform arithmetic with such a number system
Fundamentals of Computers & IT
A digital system can understand positional number system only where there are a few symbols
called digits and these symbols represent different values depending on the position they occupy in
the number.
The positional number system has different bases and the most common of them are :
• Binary
• Decimal
• Octal
• Hexadecimal
• Has total 16 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7,8, 9, A, B, C, D, E, F). Hence its base = 16
• The symbols A, B, C, D, E and F represent the decimal values 10, 11, 12, 13, 14 and 15
respectively
• The maximum value of a single digit is 15 (one less than the value of the base)
• Each position of a digit represents a specific power of the base (16)
• Since there are only 16 digits, 4 bits (24 = 16) are sufficient to represent any hexadecimal number in
binary.
• Example : (1𝐴𝐹)16
Fundamentals of Computers & IT
4 3 2 1 0
Step 1 ((1 × 2 ) + (1 × 2 ) + (1 × 2 ) + (0 × 2 ) + (1 × 2 ))
Step 2 (16 + 8 + 4 + 0 + 1)
Step 3 2910
Fundamentals of Computers & IT
Q. (10110.001)2 = ( )10
(10110.001)2=(1×24)+(0×23)+(1×22)+(1×21)+(0×20)+(0×2-1)+(0×2-2)+(1×2-3)
(10110.001)2=(1×16)+(0×8)+(1×4)+(1×2)+(0×1)+(0×1⁄2)+(0×1⁄4)+(1×1⁄8)
(10110.001)2=16+0+4+2+0+0+0+0.125
(10110.001)2=(22.125 )10
Q. (152.25)8 = ( )10
(152.25)8=(1×82)+(5×81)+(2×80)+(2×8-1)+(5×8-2)
(152.25)8=64+40+2+(2×1⁄8)+(5×1⁄64)
(152.25)8=64+40+2+0.25+0.078125
(152.25)8=106.328125
Fundamentals of Computers & IT
Step 1: Divide the decimal number to be converted by the value of the new base
Step 2: Record the remainder from Step 1 as the rightmost digit (least significant digit) of the
new base number
Step 3: Divide the quotient of the previous divide by the new base
Step 4: Record the remainder from Step 3 as the next digit (to the left) of the new base number
Repeat Steps 3 and 4, recording remainders from right to left, until the quotient becomes zero in Step 3.
• Note that the last remainder thus obtained will be the most significant digit (MSD) of the new base
number
Fundamentals of Computers & IT
Q. ( 25 )10 = ( )2
Fundamentals of Computers & IT
Q. ( 569 )10 = ( )8
Fundamentals of Computers & IT
𝐸𝑥𝑎𝑚𝑝𝑙𝑒: ( 545 )6 = ( )4
BINARY ARITHMETIC
Arithmetic operations in a computer are done using binary numbers and not decimal numbers and these
take place in its arithmetic unit.
BINARY ADDITION
BINARY SUBTRACTION
1
Fundamentals of Computers & IT
BINARY MULTIPLICATION
BINARY DIVISION
1’s complement of a binary number is another binary number obtained by toggling all bits in it, i.e.,
transforming the 0 bit to 1 and the 1 bit to 0.
2’s complement of a binary number is 1 added to the 1’s complement of the binary number.
Fundamentals of Computers & IT
COMPUTER CODES
• As computers use binary numbers for internal data representation, computer codes use binary
coding schemes.
• In binary coding, every symbol that appears in the data is represented by a group of bits.
• As most modern coding schemes use 8 bits to represent a symbol, the term byte is often used to
mean a group of 8 bits.
Codes
In the coding, when numbers or letters are represented by a specific group of symbols, it is said to be
that number or letter is being encoded. The group of symbols is called as code. The digital data is
represented, stored and transmitted as group of bits. This group of bits is also called as binary code.
If the code has positional weights, then it is said to be weighted code. Otherwise, it is a non weighted
code.
Fundamentals of Computers & IT
ALPHANUMERIC CODES
• Apart from numeric data, a computer system may process some alphanumeric data just
like the employees’ names, address as well as some special characters. An Alphanumeric
data generally consist of sequence of characters where a character is any one of the
following:-
Letters or alphabets
Digits 0-9
Special characters(+,-,π)
• In the computer system, each character is stored in some code form depending upon the
coding scheme. The character may take 6, 7, or 8 bits.
There are number of codes which are used for some specific application i.e. BCD Code,
ASCII Code, EBCDIC Code, UniCode, etc.
Fundamentals of Computers & IT
EBCDIC Code
ASCII CODE
• ASCII-7 uses 7 bits to represent a symbol and can represent 128 (27 ) different characters.
• ASCII-8 uses 8 bits to represent a symbol and can represent 256 (28 ) different characters.