0% found this document useful (0 votes)
17 views14 pages

Introduction To Number System

The document provides an overview of number systems, including decimal, binary, octal, and hexadecimal, explaining their bases, symbols, and applications. It also covers binary arithmetic operations, Boolean algebra, and the laws governing logical expressions. Additionally, it details conversion methods between different number systems and includes examples for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views14 pages

Introduction To Number System

The document provides an overview of number systems, including decimal, binary, octal, and hexadecimal, explaining their bases, symbols, and applications. It also covers binary arithmetic operations, Boolean algebra, and the laws governing logical expressions. Additionally, it details conversion methods between different number systems and includes examples for clarity.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Introduction to Number System

Number System is a method of representing numbers with the help of a set of symbols and
rules; it is a mathematical notation used to represent quantities or values in various forms.

 Humans understand decimal, and computers understand binary, so we have two


different number systems.

 Binary can be long for large amount of data, so there are more systems like octal and
hexadecimal that allow binary sequence to be broken into groups making it less error-
prone and readable compared to binary.

Number systems provide a structured way to represent numbers, enabling arithmetic


operations and ensuring consistent, understandable notation.

 A number system uses a base (or radix) to represent values.

 The base refers to the number of unique digits, including zero, that a system uses to
represent numbers.

 Each system has its own set of rules for representing.

Types of Number Systems


Number systems are of various types based on their base value
and the number of allowed digits.

Decimal Number System

The Decimal Number System is the standard system for denoting numbers.

It is also called the base-10 system.


Digits used in it are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

Each digit in the number is at a specific place value that is powers of 10.

From right to left - units has the place value as 100, Tens has the place value as 101, Hundreds
as 102, Thousands as 103, and so on.

Binary Number System

Binary Number System is the number system with base 2.

 The numbers are formed using two digits - 0 and 1.

 Binary number system is very useful in electronic devices and computer systems
because it can be easily performed using just two state i.e. 0 and 1.

 Each digit in the number is at a specific place value that is powers of 2.

 From right to left - as powers of 2 i.e. 20, 21, 22, etc).

Binary Numbers can be converted to Decimal value by multiplying each digit with the place
value and then adding the result.

Octal Number System

Octal Number System is the number system with base 8.

 The numbers are formed using 8 digits i.e. 0, 1, 2, 3, 4, 5, 6, 7.

 Octal number system is useful for representing file permissions in Unix/Linux


operating systems.

 Each digit in the number is at a specific place value that is powers of 8.

 From right to left - as powers of 8 i.e. 80, 81, 82, etc.

Hexadecimal Number System

Hexadecimal Number System is the number system with base 16.

 The numbers are formed using 16 digits i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.

 Hexadecimal Numbers are useful for handling memory address locations.

 The digits from 0 to 9 are used as in the decimal system, but the numbers 10 to 15 are
represented using the letters A to F as follows: 10 is represented as A, 11 as B, 12 as C,
13 as D, 14 as E, 15 as F.

Binary Number System


The Binary Number System, also known as the base-2 system, uses only two digits, '0' and '1',
to represent numbers. It forms the fundamental basis for how computers process and store
data. This base-2 system is the backbone of how computers process and store information,
representing everything from text to images as sequences of 0s and 1s.

The binary number (11001)₂ corresponds to the decimal number 25.

The word binary is derived from the word "bi," which is Latin for "two".

Conversion from Binary to Other Number Systems


Binary numbers use digits 0 and 1 and have a base of 2. Converting a binary number to
another number system involves changing its base. The following outlines the conversion of
binary numbers to other number systems:

Binary to Decimal Conversion


A binary number is converted into a decimal number by multiplying each digit of the binary
numbers 1 or 0 to the corresponding to the power of 2 according to the place value.

Let us consider that a binary number has n digits, B = a n-1...a3a2a1a0. Now, the corresponding
decimal number is given as:

D = (an-1 × 2n-1) +...+(a3 × 23) + (a2 × 22) + (a1 × 21) + (a0 × 20)

Let us go through an example to understand the concept better.

Example: To convert (11101011)2 into a decimal number.

Binary to Octal Conversion

Binary numbers have a base of 2, while octal numbers have a base of 8. To convert a binary
number to an octal number, the base is changed from 2 to 8.

Example: To convert (11101011)2 into an octal number

Binary to Hexadecimal Conversion

Binary numbers have a base of 2, while hexadecimal numbers have a base of 16. To convert a
binary number to a hexadecimal number, group the digits appropriately and convert to the
corresponding hexadecimal value.

Example: To convert (1110101101101)2 into a hex number.

Arithmetic Operations on Binary Numbers


We can easily perform various operations on Binary Numbers. Various arithmetic operations
on the Binary number include,

Binary Addition

The result of the addition of two binary numbers is also a binary number. To obtain the result
of the addition of two binary numbers, we have to add the digits of the binary numbers digit
by digit. The table below shows the rules of binary addition.

Binary Number (1) Binary Number (2) Addition Carry

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

Example: Find (1101)2 + (1011)2 = ?

1101 (13 in decimal)

+ 1011 (11 in decimal)

11000 (24 in decimal)

1's and 2's Complement of a Binary Number


 1's Complement of a Binary Number is obtained by inverting the digits of the binary
number.

Example: Find the 1's complement of (10011)2.

Solution:

Given Binary Number is (10011)2

Now, to find its 1's complement, we have to invert the digits of the given number.

To find the 1's complement of a binary number, you simply flip all the bits:
Thus, 1's complement of (10011)2 is (01100)2

 2's Complement of a Binary Number is obtained by inverting the digits of the binary
number and then adding 1 to the least significant bit.

Example: Find the 2's complement of (1011)2.

Solution:

Given Binary Number is (1011)2

To find the 2's complement, first find its 1's complement, i.e., (0100)2

Now, by adding 1 to the least significant bit, we get (0101)2

Hence, the 2's complement of (1011)2 is (0101)2

Boolean Algebra
Boolean Algebra is a branch of mathematics that deals with variables that have only two
possible values — typically denoted as 0 and 1 (or false and true). It focuses on binary variables
and logic operations such as AND, OR, and NOT.

 Boolean Algebra provides a formal way to represent and manipulate logical statements
and binary operations.

 It is the mathematical foundation of digital electronics, computer logic, and


programming conditions.

Logical Operations

Various operations are used in Boolean algebra, but the basic operations that form the base of
Boolean Algebra are:

• Negation or NOT Operation


• Conjunction or AND Operation
• Disjunction or OR Operation

These operations have their oymbols and precedence ,and the table added below shows the
ssymbolsand the precedence of these operators.

Operator Symbol Precedence

NOT ' (or) First


Operator Symbol Precedence

AND . (or) ∧ Second


+ (or)
OR Third

We can easily define these operations using two Boolean variables.

Let's take two Boolean variables A and B that can have any of the two values 0 or 1, i.e., they
can be either OFF or ON. Then these operations are explained as,

Negation or NOT Operation

Using the NOT operation reverse the value of the Boolean variable from 0 to 1 or vice-versa.
This can be understood as:

 If A = 1, then using NOT operation we have (A)' = 0

 If A = 0, then using the NOT operation we have (A)' = 1

 We also represent the negation operation as ~A, i.e if A = 1, ~A = 0

Conjunction or AND Operation

Using the AND operation satisfies the condition if both the values of the individual variables are
true, and if any of the values is false, then this operation gives a negative result. This can be
understood as,

 If A = True, B = True, then A . B = True

 If A = True, B = False, Or A = false, B = True, then A . B = False

 If A = False, B = False, then A . B = False

Disjunction (OR) Operation

Using the OR operation satisfies the condition if any value of the individual variables is true; it
only gives a negative result if both the values are false. This can be understood as,

 If A = True, B = True, then A + B = True


 If A = True, B = False, Or A = false, B = True, then A + B = True

 If A = False, B = False, then A + B = False

Boolean Algebra Table (Extended)

Given Below is the Expression for the Boolean Algebra

Operation Symbol Definition

AND Operation ⋅ or ∧ Returns true only if both inputs are true.

OR Operation + or ∨ Returns true if at least one input is true.

NOT Operation ¬ or ∼ Reverses the input.

XOR Operation ⊕ Returns true if exactly odd number of inputs are true.

NAND Operation ↑ Returns false only if both inputs are true.

NOR Operation ↓ Returns false if at least one input is true.

XNOR Operation ↔ Returns true if both inputs are equal.

Boolean Expression and Variables

Boolean expression is an expression that produces a Boolean value when evaluated, i.e., it
produces either a true value or a false value. Whereas Boolean variables are variables that store
Boolean numbers.

P + Q = R is a Boolean expression in which P, Q, and R are Boolean variables that can only store
two values: 0 and 1.

Thus, we can say that statements using Boolean variables and operating on Boolean operations
are Boolean Expressions. Some examples of Boolean expressions are,

 A + B = True
 A . B = True

 (A)' = False

Truth Tables

A truth table represents all the combinations of input values and outputs in a tabular manner.
All the possibilities of the input and output are shown in it ,and hence the name truth table. In
logic problems, truth tables are commonly used to represent various cases. T or 1 denotes 'True'
& F or 0 denotes 'False' in the truth table.

Number of Rows in Truth Table = 2 n

 where n is the number of Boolean variables used.

Example: Draw the truth table of the conditions A + B and A . B ,where A and B are Boolean
variables.

Solution:

The required Truth Table is,

X=A+
A B B Y=A.B

T T T T

T F T F

F T T F

F F F F

Laws for Boolean Algebra

These are the rules we use to simplify logical expressions and design efficient circuits.

1. Identity Law
In the Boolean Algebra, we have identity elements for both AND(.) and OR(+) operations. The
identity law states that in Boolean algebra, we have such variables that, on operating with the
AND and OR operations we get the same result, i.e.

 A+0=A

 A.1 = A

2. Commutative Law

Binary variables in Boolean Algebra follow the commutative law. This law states that operating
Boolean variables A and B is similar to operating Boolean variables B and A. That is,

 A. B = B. A

 A+B=B+A

3. Associative Law

Associative law states that the order of performing Boolean operator is illogical as their result is
always the same. This can be understood as,

 (A.B).C=A.(B.C)

 ( A + B ) + C = A + ( B + C)

4. Distributive Law

Boolean Variables also follow the distributive law, and the expression for the Distributive law is
given as:

 A . ( B + C) = (A . B) + (A . C)

5. Inversion Law

Inversion law is the unique law of Boolean algebra that states, the complement of the
complement of any number is the number itself.

 (A')' = A

Apart from these other laws are mentioned below:

6. AND Law

AND law of the Boolean algebra uses AND operator and the AND law is,

 A.0=0

 A.1=A
 A.A=A

7. OR Law

OR law of the Boolean algebra uses OR operator and the OR law is,

 A+0=A

 A+1=1

 A+A=A

8. Complement Law

The Complement Law states that a variable ORed with its complement is always 1, and a
variable ANDed with its complement is always 0.

 A + A' = 1

 A . A' = 0

9. Domination Law

The Domination Law states that any variable ORed with 1 will always be 1, and any variable
ANDed with 0 will always be 0.

 A+1=1

 A.0=0

10. Double Negation Law

The Double Negation Law states that the complement of the complement of a variable is the
variable itself.

 (A')' = A

Summary Table

The basic laws of Boolean Algebra are summarized in the table below:

Law OR Form AND Form

1. Identity Law P+0=P P⋅1=P

2. Idempotent Law P+P=P P⋅P=P


Law OR Form AND Form

3. Commutative Law P+Q=Q+P P⋅Q=Q⋅P

4. Associative Law P + (Q + R) = (P + Q) + R P ⋅ (Q ⋅ R) = (P ⋅ Q) ⋅ R

P + (Q ⋅ R) = (P + Q) ⋅ (P + P ⋅ (Q + R) = (P ⋅ Q) + (P ⋅
5. Distributive Law R) R)

6. Inversion Law (A′)′ = A (A′)′ = A

7. De Morgan's Law (P + Q)′ = P′ ⋅ Q′ (P ⋅ Q)′ = P′ + Q′

8. Complement Law P + P′ = 1 P ⋅ P′ = 0

9. Domination Law P+1=1 P⋅0=0

10. Double Negation


(P′)′ = P (P′)′ = P
Law

11. Absorption Law P + (P ⋅ Q) = P P ⋅ (P + Q) = P

De Morgan’s Theorems

There are two basic theorems of great importance in Boolean Algebra, which are De Morgan’s
First Law and De Morgan’s Second Law. These are also called De Morgan’s Theorems. Now let's
learn about both in detail.

De Morgan’s First Law


De Morgan's Law states that the complement of the product (AND) of two Boolean variables (or
expressions) is equal to the sum (OR) of the complement of each Boolean variable (or
expression).

(P.Q)' = (P)' + (Q)'

The truth table for the same is given below:

P Q (P)' (Q)' (P.Q)' (P)' + (Q)'

T T F F F F

T F F T T T

F T T F T T

F F T T T T

We can cee that truth values for (P.Q)' are equal to truth values for (P)' + (Q)', corresponding to
the same input. Thus, De Morgan's first law is true.

De Morgan’s Second Law

Statement: The Complement of the sum (OR) of two Boolean variables (or expressions) is equal
to the product(AND) of the complement of each Boolean variable (or expression).

(P + Q)' = (P)'.(Q)'

Proof:

The truth table for the same is given below:

(P) (P +
P Q ' (Q)' Q)' (P)'.(Q)'

T T F F F F
(P) (P +
P Q ' (Q)' Q)' (P)'.(Q)'

T F F T F F

F T T F F F

F F T T T T

We can see that truth values for (P + Q)' are equal to truth values for (P)'.(Q)', corresponding to
the same input. Thus, De Morgan's second law is true.

Applications of Boolean Algebra

Boolean Algebra finds applications in many other fields of science related to digital logic design,
computer science, telecommunications, etc. Some of its applications are:

Digital Logic Design:

Boolean Algebra acts as the backbone of digital logic design, being the most important element
in the creation and analysis of digital circuits used in computers, smartphones, and all other
electronic devices. It helps simplify the logic gates and circuits so that in the design of digital
systems, they can be effectively designed and optimized.

Algorithm Design:

In computer science, Boolean Algebra is utilized in the design and study of algorithms,
particularly in fields that require decision-making processes. It's vital in database query
optimization, where Boolean logic is utilized to filter and obtain specific data based on
circumstances.

Telecommunications:

Boolean Algebra finds application in the design and analysis of communication systems in
telecommunication. More specifically, it is used in error detection and correction mechanisms.
It is also used in the modulation and encoding of signals so that data is efficiently and accurately
transmitted over networks.

Artificial Intelligence (AI):


Boolean Algebra is vital in AI, notably in the construction of decision-making algorithms and
neural networks. It's used to model logical thinking and decision trees, which are crucial in
machine learning and expert systems.

Electrical Engineering:

In electrical engineering, Boolean Algebra is employed to analyze and design switching circuits,
which are important in the operation of electrical networks and systems. It aids in the
optimization of these circuits, ensuring minimal energy loss and effective functioning.

You might also like