Anda di halaman 1dari 57

Louie Angelo M.

Jalandoni

The mathematical representation of numerals according to its bases.

Binary base 2 ( 0 and 1 ) Octal base 8 ( 0 7 ) Decimal base 10 ( 0 9 ) Hexadecimal base 16 ( 0 9 ) ( A F )

Binary 0000 0001 0010 0011 0100

Decimal 0 1 2 3 4

Octal 0 1 2 3 4

Hexadecimal 0 1 2 3 4

0101
0110 0111 1000

5
6 7 8

5
6 7 10

5
6 7 8

Binary 1001 1010 1011 1100 1101

Decimal 9 10 11 12 13

Octal 11 12 13 14 15

Hexadecimal 9 A B C D

1110
1111

14
15

16
17

E
F

1. Divide the decimal number to its base 2. Write the remainder on the right side 3. Repeat Step 1 and 2 until the quotient became zero 4. Read all the remainders from bottom to top.

Base 2 2 2 2 2 2

Decimal 50 25 12 6 3 1 0

Remainder 0 1 0 0 1 1 0

When the remainder will be read from bottom to top it will be 01100102

Convert the following decimal values in binary, octal and hexadecimal 1. 425 2. 330 3. 927

0110010
0 x 20
1 x 21

1 x 24 1 x 25
Add up the product of the 1s multiplied to base raise to the positional value then the value will be 0110010 = 2 + 16 + 32 = 50

0110010 Remember that the left most bit is the most significant bit and the right most is the least significant bit Group the number by three starting from the LSB until you reach the MSB 0 / 110 / 010 = 0 6 2 8

0110010 Do the same process on Binary to Octal but group the term by four. 011 / 0010 Convert the number using the binary system to decimal again. 011 = 3 0010 = 2 Then the answer is 3216

Convert each character into binary composing 3 bits binary number 6 2 110 010 Then combine the converted number 1100102

The same on Binary but the base will be 8 instead of 62 2 x 81 = 2 6 x 82 = 48 Add the values and the answer will be 5010

Convert each character into binary composing 4 bits binary number 3 2 0011 0010 Then combine the converted number 1100102

The same on Binary but the base will be 16 instead of 32 2 x 161 = 2 3 x 162 = 48 Add the values and the answer will be 5010

1. 2. 3.

CONVERSION of FRACTIONAL PART


(From Decimal to any Bases)
Multiply the given Decimal number by the base-r of the nummber into which the given decimal no. is to be converted to. Repeat the proceeding process until the fractions becomes Zero or until the number of digits have sufficient accuracy Generate the Final answer from the integral part from TOP to BOTTOM.

STEPS:

Example: 0.125 >>>Binary=(001)2 INTEGER


0.125x2 0.25x2 0.5x2 0 0 1

FRACTIONAL PART
0.25 0.5 0

INTEGER 0.125 >>>OCTAL = (0.1)8 1 INTEGER 2

FRACTIONAL PART 0 FRACTIONAL PART 0

0.125 >>>HEXADECIMAL =(0.2)16

Used in Digital Computers for simplifying subtraction operation and for logical operation. Radix Complement rs complement =10 Diminished Radix Complement r -1s complement = 9

ONEs COMPLEMENT (1s)


From a Binary, it is obtained by subtracting each digit from which cause the bit to change from 0 to 1 & from 1 to 0. NOTE: BINARY-2s complement;1s complement OCTAL 7s complement HEX 15s complement

To get the 1s complement, just invert the values of the term To get the 2s complement, just add 1 to the 1s complement.

STEPS in Binary Subtraction Using 1s Complement 1. Copy the minuend 2. Get the 1s complement of the subtrahend then add it to the minuend 3. If there is an end carry, Add 1 to the sum otherwise, get the 1s complement of the sum then prefix a NEGATIVE sign (-).

STEPS in Binary Subtraction Using 2s Complement The twos complement of a Binary number is obtained by getting its Ones complement then adding 1 to Binary.

Binary Logic
Deals with variable that take on two discrete values and with operations that assume logical meaning. Used to describe in mathematical way the manipulation & processing Binary information.
LOGIC 1 HIGH +5V OPEN ON TRUE LOGIC 0 LOW 0V CLOSE OFF FALSE

Variables are represented by a single letter having only two values: 1 or 0. There are three basic logic operation: And Operation represented by a dot or an absence of operation. Z = X.Y or Z = XY Or Operation represented by plus sign. Z = X+Y Not Operation represented by a prime or bar Z = X

LOGIC GATES
blocks of hardware that produce a logic output signal if the input requirement has been satisfied.

LOGIC CIRCUIT
The interconnection of gates to achieve a prescribed outcome

TRUTH TABLE
Tabulations of all possible combinations of input & its corresponding output

The answer is false when one is false Truth Table


X 0 0 1 1 Y 0 1 0 1 Z (OUTPUT) 0 0 0 1

Equation: Z = XY

The answer is true when one is true Truth table


X 0 0 1 1 Y 0 1 0 1 Z (OUTPUT) 0 1 1 1

Equation: Z = X+Y

Inverse value Truth Table

X 0 1

Z (OUTPUT) 1 0

Equation: Z = X

Nand Gate Nor Gate

The answer is true when one is false Truth Table


X 0 0 1 1 Y 0 1 0 1 Z (OUTPUT) 1 1 1 0

Equation: Z = (XY)

The answer is false when one is true Truth table


X 0 0 1 1 Y 0 1 0 1 Z (OUTPUT) 1 0 0 0

Equation: Z = (X+Y)

EX OR EX NOR

The answer is true when the inputs are different Truth table
X 0 0 1 1 Y 0 1 0 1 Z (OUTPUT) 0 1 1 0

Equation: Z = XY + XY

The answer is true when the inputs are same Truth table
X 0 0 1 1 Y 0 1 0 1 Z (OUTPUT) 1 0 0 1

Equation: Z = XY + XY

Summary truth tables


The summary truth tables below show the output states input for all types of 2-input and 3-gates:
Summary for all 2-input gates
Inputs A 0 0 1 1 B 0 1 0 1 AND 0 0 0 1 NAND 1 1 1 0 Output of each gate OR NOR 0 1 1 0 1 0 1 0 EX-OR 0 1 1 0 EX-NOR 1 0 0 1

Note : that EX-OR and EX-NOR gates can only have 2 inputs.

Summary for all 3-input gates


A 0 0 0 0 1 1 1 Inputs B 0 0 1 1 0 0 1 C 0 1 0 1 0 1 0 AND 0 0 0 0 0 0 0 Output of each gate NAND OR 1 0 1 1 1 1 1 1 1 1 1 1 1 1 NOR 1 0 0 0 0 0 0

Type

Distinctive shape

Rectangular shape

Boolean algebra between A & B

Truth table

INPUT A 0 AND 0 1 1 B 0 1 0 1

OUTPUT A AND B 0 0 0 1

INPUT A 0 OR B 0 1 0 1

OUTPUT A OR B 0 1 1 1

A + B

0 1 1

INPUT A NOT 0 1

OUTPUT NOT A 1 0

In electronics a NOT gate is more commonly called an inverter. The circle on the symbol is called a bubble, and is generally used in circuit diagrams to indicate an inverted input or output.

INPUT A 0 NAND 0 1 1 B 0 1 0 1

OUTPUT A NAND B 1 1 1 0

INPUT A 0 NOR 0 1 1 B 0 1 0 1

OUTPUT A NOR B 1 0 0 0

INPUT OUTPUT A 0 XOR 0 1 1 B 0 1 0 1 A XOR B 0 1 1 0 OUTPUT A XNOR B 1 0 0 1

INPUT A 0 XNOR 0 1 1 B 0 1 0 1

Two more gates are the exclusive-OR or XOR function and its inverse, exclusiveNOR or XNOR. The two input Exclusive-OR is true only when the two input values are different, false if they are equal, regardless of the value. If there are more than two inputs, the gate generates a true at its output if the number of true s at its input is odd.. In practice, these gates are built from combinations of simpler logic gates.

BASIC GATES

NAND Gate Implementation

NOR Gate Implementation

NOT Gate

OR Gate

AND Gate

A Mathematical notation used to represent the function of the Digital circuit. A notation that allows variables & constants to have only 2 possible values 0 & 1. The Term Boolean Algebra honors a fascinating English mathematician; George Boole

- An expression formed with Binary variables the two operators OR & AND & a UNARY operator not parenthesis & equal sign for the given variables the function can either be One or Zero.

EQUATION No. 1 2

3
4 5 6 7 8 9

BOOLEAN EQUATION X+Y=Y+X XY = YX X + (Y + Z) = (X + Y) + Z X(YZ) = (XY)Z X X=X X+X=X X 1=X X+1=1 X 0=0 X+0=X X (Y + Z) = XY + XZ (XY) + (XZ) = X + YZ X X = 0 X + X = 1 (X) = X X + XY = X X (X + Y) = X X + (XY) = X + Y

DESCRIPTION Commutative Property Associative Property

Idempotent Property
Identity Property Null Property Distributive Property Negation Property Double Negation Property Absorption Property

Y= C+CA + CB +C Using commutative law Y=CA + CB +C+C Using Idempotent law where Y = CA + CB + 1 OR Condition of 1 Y=1

xy = x + y

Is equivalent to

(x+y ) = xy

Canonical forms boolean functions expressed in sum of minterms or product of maxterms.

a single variable or product of variable which may or may not be complemented. Denoted by a lower case m, the equation is anded F= AB +AC+ ABC + AB

A single variable or sum of variables, denoted by an Uppercase M and the equation is ored. F = (A+C+D)(A+D)(D+A)

MINTERMS & MAXTERMS WITH 3 BINARY VARIABLES


X
0 0 0 0 1 1 1 1

Y
0 0 1 1 0 0 1 1

Z
0 1 0 1 0 1 0 1

MINTERMS DESIGNATION
X'Y'Z' X'Y'Z X'YZ' X'YZ XYZ X'Y'Z' XY'Z' XYZ 0's to express m0 m1 m2 m3 m4 m5 m6 m7

MAXTERMS DESIGNATION
X+Y+Z X+Y'+Z' X+Y+Z' X+Y'+Z X'+Y+Z X+Y+Z' X'+Y'+Z X'+Y'+Z' 1's to express M0 M1 M2 M3 M4 M5 M6 M7

MINTERM:
F = ABC + ABC + A B C F(A,B,C) =m3 + m4 + m1

MAXTERM:
F = (A+B+C) +( A+B+C )+ (A+ B +C) F(A,B,C) =M4 . M7 . M0

Standard Form of Equation: The term that form the function may be one or any number or literal. TWO TYPES: Sum of Product (SOP) A Boolean expression containing AND terms called PRODUCT of TERMS (one or more literals) Ex: F=Y + XY+XYZ PRODUCT OF SUM (POS) A Boolean expression containing OR terms called sum term. Each term may have any number of literals Ex: F=(X+Y)(Y+Z)(X+YZ)

Map a diagram made up of squares represents one minterm


KARNAUGH MAP
A chart or grid containing boxes called cells; each which represents one minterm.

TYPES of MAP
1. Two Variable Map
Consists of two variables

2. Three Variable Map


A three variable map plotted in a map

3. FOUR Variable Map

Steps:
Construct the K-Map & place 1s in the squares corresponding to 1s in truth table ; place zeros in the other squares.
Examine the map for adjacent 1s & loop those 1s which are not adjacent to any other ones. Looping continue as there are pairs octet or quad that contains 1. You can still loop the one that is already looped if there are still other 1s left. Form the OR sum of all terms generated by each loop.

2 Variable Karnaugh Map 2 INPUT OR GATE

3-variable Karnaugh maps


Here is the truth table for a 3-input system

3-variable examples
1. Simplify the following expression using a Karnaugh map:

input C 0 0 0 0 1 1 1 1

input B input A 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1

output 0 0 0 1 0 1 1 1

You may be able to tell what is going to happen by completing the truth tab The Boolean statement is:

The truth table is:

This is converted into a Karnaugh map, as follows:

input C input B input A 0 0 0 0 0 1


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

output 0 1
1 0 0 1 1 0

The Karnaugh map is:

This is the exclusive OR function. The value of C is irrelevant.

B A A m0 m2

B m1 m3

BC A A m0 m4

BC m1 m5

BC m3 m7

BC m2 m6

TRUTH TABLE 3-variable:


A 0 0 0 0 1 1 1 B 0 0 1 1 0 1 1 C 0 1 0 1 0 0 1 X 0 1 1 0 1 0 1 B'C' 0 1 B'C 1 0 BC 0 1 BC' 1 0

X = AB'C' + A'B'C+ABC+A'BC'

CD AB AB AB AB m0 m4 m12 m8

CD m1 m5 m13 m9

CD m3 m7 m15 m11

CD m2 m6 m14 m10