0% found this document useful (0 votes)
10 views16 pages

Foc 1st Chapter Notes

The document provides an overview of number systems, defining them as methods for expressing numbers using digits or symbols, with a focus on four main types: decimal, binary, octal, and hexadecimal. It also discusses the characteristics of number systems, conversions between them, complements, arithmetic operations, computer codes, logic gates, and Boolean algebra. Each section includes definitions, examples, and basic operations relevant to the respective topics.

Uploaded by

divya13112021
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)
10 views16 pages

Foc 1st Chapter Notes

The document provides an overview of number systems, defining them as methods for expressing numbers using digits or symbols, with a focus on four main types: decimal, binary, octal, and hexadecimal. It also discusses the characteristics of number systems, conversions between them, complements, arithmetic operations, computer codes, logic gates, and Boolean algebra. Each section includes definitions, examples, and basic operations relevant to the respective topics.

Uploaded by

divya13112021
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
You are on page 1/ 16

1.1 Introduction to number system.

Definition:
A number system is defined as a system of writing to express
numbers. It is the mathematical notation for representing numbers of
a given set by using digits or other symbols in a consistent manner.

It provides a unique representationof every number and represents the


arithmetic and algebraic structure ofthe figures. It also allows us to
operate arithmetic operations like addition, subtraction,
multiplication and division. The value of any digit in a number can be
determined by:
•The digit
•Its position in the number
•The base of the number system

(Number Digit) (System base number )=(N)b

Types of Number Systems:

In the Number System, each number is represented by its base. If the


base is 2 it is a binary number, if the base is 8 it is an octal number, if the
base is 10, then it is called decimal number system and if the base is16, it is
part of the hexadecimal number system.

Based on the base value and the number of allowed digits, number
systems are of many types.
The four common types of Number System are:
1)Decimal Number System (Base 10 Number System)
The decimal number system has a base of 10 because it uses ten digits from 0
to 9. In the decimal number system, the positions successive to the left of the
decimal point represent units, tens, hundreds, thousands and so on. This
system is expressed in decimal numbers. Every position shows a particular
power of the base (10).

Example of Decimal Number System:


The decimal number 1457 consists of the digit 7 in the units position, 5 in
the tens place, 4 in the hundreds position, and 1 in the thousands place whose
value can be written as:(1×103) + (4×102) + (5×101) + (7×100)
(1×1000) + (4×100) + (5×10) + (7×1)
1000 + 400 + 50 + 7
1457

2)Binary Number System (Base 2 Number System)


The base 2 number system is also known as the Binary number system
wherein, only two binary digits exist,i.e., 0 and 1. Specifically, the usual
base-2 is a radix of 2. The figures described under this system are known as
binary numbers which are the combination of 0 and 1. For example, 110101
is a binary number. We can convert any system into binary and vice versa.

Example:
Write (14)10 as a binary number.
2 14 Reminder
2 7 0
2 3 1

∴ ( 1 4 ) 1 0 =(1110)2
1 1

3)Octal Number System (Base 8 Number System)


In the octal number system, the base is 8 and it uses numbers from 0 to 7 to
represent numbers. Octal numbers are commonly used in computer
applications. Converting an octal number to decimal is the same as decimal
conversion and is explained below using an example.

Example:
Convert 2158 into decimal.

Method
2158 = 2 × 82 + 1 × 81+ 5 × 80
= 2 × 64 + 1 × 8 + 5 × 1
= 128 + 8 + 5= (141)10

4)Hexadecimal Number System (Base 16 Number System)


In the hexadecimal system, numbers are written or represented with base 16.
In the hexadecimal system, the numbers are first represented just like in the
decimal system, i.e., from 0 to 9. Then, the numbers are represented using the
alphabet from A to F. The below-given table shows the representation of
numbers in the hexadecimal number system.
Characteristics of Number System:
•Each numeral system is characterized by its base and the base is never a
digit.
•The numeral systems have a base or set of symbols that allow representing
the different numeral quantities.
•They have a number or quantity that is formed by the juxtaposition of the
different elements.
•Each element within the numeral system has a weighted value The number 0
expresses or denotes the absence of a given quantity.
•It is a positional system.
•They are composed of digits.

Explanation:
The correct characteristic is that the 'The size of base is more than the number
of digits’, that is
•In binary system, the digits can be 0 and 1 and the base is 2.
• In octal system, the digits are 0, 1, 2, 3, 4, 5, 6 and 7 and the base is 8.
•In decimal system, the digits are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 and the base is
10.

1.2Conversion from one number system to other Decimal Conversion)


Full problems

1.3Complements of number systems and arithmetic operations

Complements are used in digital computers to simplify the subtraction


operation and for logical manipulation.
There are two types of complements for each base‐r system: the

radix complements and the diminished radix

complement. The first is referred to as


the r’s complement and the second as the (r-1)’s complement.

1.3.1: Binary numbers Complement:


1- One's (first) Complement:
1's complement= rn-N-1
Where (n):number of bits
N: binary number
r: system base
Simply the 1’s complement of binary number is the number we get
by changing each bit
(0 to 1) and (1 to 0).
Example: the first complement of
(101100)2
Solution:
binary number 101100
1’s complement 010011

2- The Two's (second) Complement:


2's complement =rn--N
Simply the 2's complement is equal to 1's complement added by one.
Example: find the 2's complement of
(101101)2
Solution:
binary number 101101
1’s complement 010010
2’s complement 010010 + 1 = 010011

Binary Arithmetic Operations

a. Binary additions
and subtractions are performed as same in decimal additions and
subtractions. When we perform binary additions, there will have two outputs:
Sum (S) and Carry (C). There are four rules for binary addition. These are
given as following below,

b.
Input A Input B Sum(s)=A+B Carry (c)
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

Binary subtraction
. These are given as following below,

Input A Input B Subtract(s)=A-B Borrow(B)


0 0 0 0
0 1 0 1
1 0 1 0
1 1 0 0

Borrow 1 is required from next higher order bit to subtract 1 from 0.So,result
become 0

c.Binary multiplication. These are given as following


Input A Input B Multiply (M)
0 0 0
0 1 0
1 0 0
1 1 1

Whenever at least one input is 0, then multiplication is always 0.

d.Binary division:
Dividend, Divisor, quotient, and remainder. These are given as following
rules for binary division,

Input A Input B Divide (D)


0 0 Not defined
0 1 0
1 0 Not defined
1 1 1
Whenever divisor is 0, then result is always not defined.

Examples for Asthmatic Operations


Example: Add the two binary numbers (001) and (100)
001
+100
101
Example: Add the two binary numbers (111) and (001)
Carry ->
11
111
+001
1000
Example: subtract the binary number (100) from (101)
101
-100
001
Example: subtract the binary number (1101) from (1110)
11 1 0
-11 0 1
0001

Example: Multiply the two binary numbers(111)2 and (101)2

Example: divide the number (11011) on (101)

1.4Computer codes (BCD, EBCDIC, ASCII Code, Gray code, Excess-3


code and Unicode)
Computer code refers to a set of instructions that a computer can understand
and execute. It can be written in a variety of programming languages, such as
C++, Python, Java, and many others. These instructions tell the computer
what and how to do it, and they can be used to create software, websites, and
other digital products. Computers and digital circuits processes information
in the binary format. Each character is assigned 7 or 8 bit binary code to
indicate its character which may be numeric, alphabet or special symbol.

Example – Binary number 1000001 represents 65(decimal) in straight binary


code, alphabet A in ASCII code and 41(decimal)in BCD code.

Types of codes

a)BCD (Binary-Coded Decimal) code:


•Four-bit code that represents one of the ten decimal digits from 0 to 9.
•Example - (37)10 is represented as 0011 0111 using BCD code, rather than
(100101)2 in straight binary code.
•Thus, BCD code requires more bits than straight binary code.
•Still, it is suitable for input and output operations in digital systems. Note:
1010, 1011, 1100, 1101, 1110, and 1111 are INVALID CODE in BCD code.
ASCII (American Standard Code Information Interchange) code:
•It is 7-bit or 8-bit alphanumeric code.
•7-bit code is standard ASCII supports 127 characters.
•Standard ASCII series starts from 00h to 7Fh, where 00h-1Fh are used as
control characters and 20h-7Fh as graphics symbols.
•8-bit code is extended ASCII supports 256 symbols where special graphics
and math's symbols are added.
•Extended ASCII series starts from 80h to FFh.
EBCDIC (Extended Binary Coded Decimal Interchange Code) code
•8-bit alphanumeric code developed by IBM, supports 256 symbols.
•It was mainly used in IBM mainframe computers.

Gray code
•Differs from leading and following number by a single bit.
•Gray code for 2 is 0011 and for 3 is 0010.
•No weights are assigned to the bit positions.
•Extensively used in shaft encoders.

Excess-3 code
•4-bit code is obtained by adding binary 0011 to the natural BCD code of the
digit.
•Example - decimal 2 is coded as 0010 + 0011 = 0101 as Excess-3 code.
•It not weighted code.
•Its self-complimenting code, means 1's complement of the coded number
yields 9's complement of the number itself.
•Used in digital system for performing subtraction operations.

Unicode:
A standard for representing characters as integers. Unlike ASCII, which uses
7 or 8 bits for each character,Unicode uses 16 bits, which means that it can
represent more than 65,000 unique characters. This is a bit of overkill for
English and Western-European languages, but it is necessary for some other
languages, such as Greek, Chinese and Japanese. Many analysts believe
that as the software industry becomes increasingly global, Unicode will
eventually supplant ASCII as the standard character coding format.
1.5Logic gates
Computers and digital component use binary 0and 1, where 0 is low voltage (0
volts) and 1 is high voltage (+5 volts). Binary information is carried by signals
and manipulation of binary information is done by logic circuits called as
gates. A circuit whose input and output signals are two states on and off. A
gate is logic circuit with one or more input signals but only one output signal.

Basic types of Gates:

AND Gate
•Two or more input signals and one output signal.
•Output is high when both the inputs are high.
•Logic equation Y = A X B called as Boolean equation.
•Where A and B are the inputs and Y is the output for all standard symbols of
gates shown below.

OR Gate
•Two or more input signals and one output signal.
•Output is low when both the inputs are low.
•Logic equation Y = A + B.

NOT Gate
•One input signal and one output signal, also called asinverter.
•Output is always opposite state of the input.
•Logic equation Y =A
•Where is A is the complement of A.

NAND (Not AND) Gate


•Two or more input signals and one out signal.
•It has high output when at least one of the inputs iszero or low.
•All input signals must be high to obtain low output.
•Logic equation Y = A X B

NOR (Not OR) Gate


•One or more input signals and one output signal.
•If one of the input is high then output is low
•Logic equation Y = A + B
XOR (Exclusive OR) Gate
•Two or more input signal and one output signal.
•Output is low when both the inputs are same.
•Logic equation Y = A XOR B

XNOR (Exclusive NOR) Gate


•Two or more input signal and one output signal.
•Is combination of XOR gate followed by invertor.
•Output is high when both the inputs are same and Logic equation is
Y = A XOR B

1.6 Boolean algebra (rules, laws, De-Morgan Theorem, Boolean


expressions and simplifications)

Boolean algebra is a branch of algebra that only uses ‘false’ and ‘true’ values for
variables and is usually denoted by 0 and 1.
It is defined as a system of logic where variables are represented as whole
numbers between 0 and 1.
The values that you take on the numbers are true or false, but not both at the
same time.
A variable is either true or false, but never both true and false simultaneously.
The variables of Boolean algebra can take only one of two possible values,
zero and one.
Still, like any other mathematical expression, Boolean expressions too can
have an infinite number of variables, all of which represent different
individual inputs to the expression.
A complete understanding of the laws and theorems must be grasped to
use Boolean algebra properly.
Boolean expressions can also be converted using logic gates like OR gate,
AND gate, NOT gate, NOR gates,XOR gates, XNOR gates, NAND gates,
etc.
The three basic Boolean operations are:
1.OR gate returns ‘true’ or ‘1’ if either of the input variables is true.

A B A OR B=A+B
0 O O
0 1 1
1 0 1
1 1 1

2.AND gate returns ‘true’ or ‘1’ only if all the input variables
are true.

A B A AND B=A.B
0 O O
0 1 0
1 0 0
1 1 1

3.NOT gate returns the complement value of the input variable.


A A’
0 1
1 0

Basic Laws of Boolean Algebra


In all the cases given below A can either be 0 or 1
1.A × 0 = 0

2.A × 1 = A

3.A × A = A

4.A × A = 0

5.A + 0 = A

6.A + 1 = 1
7.A + A = 1

8.A + A = A

Some basic Boolean algebra laws that are used to simplify Boolean
expressions are:
1. Idempotent Law
A × A = A
A + A = A

2. Associative Law
(AxB)xC=Ax(BxC)
(A+B)+C=A+(B+C)
3. Commutative Law
AxB=BxA
A+B=B+A

4. Distributive Law
Ax(BxC)=AxB+AxC
A+(B+C)=(A+B)x(A+C)

5. Identity Law

A×0=0 A×1=

A+1=1 A+0=A

6. Complement Law

A × A = 0

A + A = 1

7. Involution Law
(A )̅ = A

8. DeMorgan’s Law(Rewrite using text book)

(A × B)̅ = A + B

(A + B)̅ = A × B

9. Absorption (Rewrite using text book)

A + (A × B) = A

A × (A + B) = A

(A × B ) + (A × B ) = A

(A+ B ) × (A + B ) = A

A + (A × B) = A + B

A × (A + B) = A × B

You might also like