0% found this document useful (0 votes)
174 views34 pages

Number System and Logic Gates

Number systems are techniques to represent numbers in computers using defined sets of values. The most common are the binary, decimal, octal, and hexadecimal systems. Binary uses two digits (0,1) and is used in digital circuits. Logic gates are basic computing elements that perform operations on inputs and produce outputs. Common gates include AND, OR, NOT, NAND, NOR, XOR, and XNOR. NAND and NOR gates are considered universal as they can reproduce the functionality of other gates.

Uploaded by

Shoaib Samim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views34 pages

Number System and Logic Gates

Number systems are techniques to represent numbers in computers using defined sets of values. The most common are the binary, decimal, octal, and hexadecimal systems. Binary uses two digits (0,1) and is used in digital circuits. Logic gates are basic computing elements that perform operations on inputs and produce outputs. Common gates include AND, OR, NOT, NAND, NOR, XOR, and XNOR. NAND and NOR gates are considered universal as they can reproduce the functionality of other gates.

Uploaded by

Shoaib Samim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

NUMBER SYSTEM AND LOGIC GATES

NUMBER SYSTEM

• Number system are the technique to represent numbers in the computer system
architecture , every value that you are saving or getting into/ from computer
memory has a defined number system.
• A number system is a system representing numbers. It is also called the system
of numeration and it defines a set of values to represent a quantity. These
numbers are used as digits and the most common ones are 0 and 1, that are used
to represent binary numbers.
TYPES OF NUMBER SYSTEM.

BINARY SYSTEM: Binary number is a number expressed in the base-2 numeral


system or binary numeral system, a method of mathematical expression which uses
only two symbols: typically “0” (zero) and “1” (one).
• The base-2 numeral system is a positional notation with a radix of 2. Each digit is
referred to as a bit, or binary digit. Because of its straightforward implementation in
digital electronic circuitry using logic gates, the binary system is used by almost all
modern computers and computer-based devices, as a preferred system of use, over
various other human techniques of communication, because of the simplicity of the
language.
• DECIMAL NUMBER SYSTEM

• Decimal system, also called Hindu-Arabic number system or Arabic number system, in
mathematics, positional numeral system employing 10 as the base and requiring 10
different numerals, the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. It also requires a dot (decimal point)
to represent decimal fractions. In this scheme, the numerals used in denoting a number
take different place values depending upon position. In a base-10 system the number 543.21
represents the sum (5 × 102) + (4 × 101) + (3 × 100) + (2 × 10−1) + (1 × 10−2).
• OCTAL NUMBER SYSTEM

• The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0
to 7, that is to say 10 represents 8 in decimal and 100 represents 64 in decimal. However,
English uses a base-10 number language system and so a true octal system might use
different language to avoid confusion with the decimal system.
• Octal numerals can be easily converted from binary representations (similar to a Quaternary
numeral system) by grouping consecutive binary digits into groups of three (starting from
the right). For example, the binary representation for decimal 74 is 1001010. Two zeroes can
be added at the left: (00)1 001 010, corresponding the octal digits 1 1 2, yielding the octal
representation 112.
• HEXADECIMAL NUMBER SYSTEM

• The hexadecimal numeral system, often shortened to “hex”, is a numeral


system made up of 16 symbols (base 16). The standard numeral system is
called decimal (base 10) and uses ten symbols: 0,1,2,3,4,5,6,7,8,9.
Hexadecimal uses the decimal numbers and six extra symbols. There are
no numerical symbols that represent values greater than nine, so letters
taken from the English alphabet are used, specifically A, B, C, D, E and
F. Hexadecimal A = decimal 10, and hexadecimal F = decimal 15.
CONVERT BINARY TO DECIMAL.
DECIMAL TO HEXADECIMAL
DECIMAL TO OCTAL
ONE’S COMPLEMENT

The ones’ complement of a binary number is the value obtained by inverting all the
bits in the binary representation of the number (swapping 0s and 1s). This
mathematical operation is primarily of interest in computer science, where it has
varying effects depending on how a specific computer represents numbers.
• A ones’ complement system or ones’ complement arithmetic is a system in which
negative numbers are represented by the inverse of the binary representations of
their corresponding positive numbers. In such a system, a number is negated
(converted from positive to negative or vice versa) by computing its ones’
complement.
TWO’S COMPLEMENT

• Two’s complement is the most common method of representing signed integers on


computers,[1] and more generally, fixed point binary values.
• Compared to other systems for representing signed numbers (e.g., ones’ complement),
two’s complement has the advantage that the fundamental arithmetic operations of
addition, subtraction, and multiplication are identical to those for unsigned binary
numbers (as long as the inputs are represented in the same number of bits as the
output, and any overflow beyond those bits is discarded from the result). This property
makes the system simpler to implement, especially for higher-precision arithmetic.
Unlike ones’ complement systems, two’s complement has no representation for
negative zero, and thus does not suffer from its associated difficulties.
9’S COMPLEMENT

• The 9’s complement is used to find the subtraction of the decimal


numbers. The 9’s complement of a number is calculated by subtracting
each digit of the number by 9. For example, suppose we have a number
1423, and we want to find the 9’s complement of the number. For this, we
subtract each digit of the number 1423 by 9. So, the 9’s complement of the
number 1423 is 9999-1423= 8576.
10’S COMPLEMENT

• The 10’s complement is also used to find the subtraction of the decimal numbers. The 10’s
complement of a number is calculated by subtracting each digit by 9 and then adding 1 to
the result. Simply, by adding 1 to its 9’s complement we can get its 10’s complement value.
For example, suppose we have a number 1423, and we want to find the 10’s complement of
the number. For this, we find the 9’s complement of the number 1423 that is 9999-1423=
8576, and now we will add 1 to the result. So the 10’s complement of the number 1423 is
8576+1=8577.
UNIVERSAL GATES

• A universal gate is a gate which can implement any Boolean function without need to
use any other gate type. The NAND and NOR gates are universal gates. In practice, this
is advantageous since NAND and NOR gates are economical and easier to fabricate and
are the basic gates used in all IC digital logic families.
DEFINE LOGIC GATES

• A logic gate is an idealized model of computation or physical electronic device


implementing a Boolean function, a logical operation performed on one or
more binary inputs that produces a single binary output.
NAND GATE.

• A NAND gate (NOT-AND) is a logic gate which produces an output which is


false only if all its inputs are true; thus its output is complement to that of an
AND gate. A LOW (0) output results only if all the inputs to the gate are HIGH
(1); if any input is LOW (0), a HIGH (1) output results. A NAND gate is made
using transistors and junction diodes. By De Morgan’s laws, a two-input NAND
gate’s logic may be expressed as AB=A+B, making a NAND gate equivalent to
inverters followed by an OR gate.
TRUTH TABLE FOR NAND GATE?
NOR GATE.

• The NOR gate is a digital logic gate that implements logical NOR – it behaves
according to the truth table to the right. A HIGH output (1) results if both the inputs
to the gate are LOW (0); if one or both input is HIGH (1), a LOW output (0) results.
NOR is the result of the negation of the OR operator. It can also in some senses be
seen as the inverse of an AND gate. NOR is a functionally complete operation—NOR
gates can be combined to generate any other logical function
TRUTH TABLE FOR NOR GATE.
AND GATE

• The AND gate is a basic digital logic gate that implements


logical conjunction from mathematical logic – it behaves
according to the truth table above. A HIGH output results only
if all the inputs to the AND gate are HIGH. If none or not all
inputs to the AND gate are HIGH, LOW output results.
OR GATE

• The Logic OR Gate is a type of digital logic circuit whose output goes HIGH
to a logic level 1 only when one or more of its inputs are HIGH. The output, Q
of a “Logic OR Gate” only returns “LOW” again when ALL of its inputs are
at a logic level “0”.
NOT GATE

• A NOT gate is a logic gate that inverts the digital input signal. For this
reason, a NOT gate is sometimes is referred to as an inverter (not to be
confused with a power inverter). A NOT gate always has high (logical 1)
output when its input is low (logical 0).
XOR GATE

• XOR gate is a digital logic gate that gives a true output when the number of true
inputs is odd. An XOR gate implements an exclusive or from mathematical logic;
that is, a true output results if one, and only one, of the inputs to the gate is true. If
both inputs are false or both are true, a false output results.
XNOR GATE

• The XNOR gate is a digital logic gate whose function is the logical complement of the
Exclusive OR gate. It is equivalent to the logical connective from mathematical logic,
also known as the material biconditional.
BUFFER GATE

• A buffer, is a basic logic gate that passes its input, unchanged, to its output. Its
behavior is the opposite of a NOT gate. The main purpose of a buffer is to
regenerate the input, usually using a strong high and a strong low. A buffer has one
input and one output; its output always equals its input.

You might also like