0% found this document useful (0 votes)
7 views

Module 10 Part 4

The document discusses binary, octal, and hexadecimal number systems. It explains how to convert between decimal, binary, octal, and hexadecimal numbers. Examples are provided of converting specific numbers between the different number bases.

Uploaded by

rizamontecalbo1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Module 10 Part 4

The document discusses binary, octal, and hexadecimal number systems. It explains how to convert between decimal, binary, octal, and hexadecimal numbers. Examples are provided of converting specific numbers between the different number bases.

Uploaded by

rizamontecalbo1
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Module 10 – Part 4

Binary Number System

The decimal system is called a base-10 system because it contains ten digits, 0
through 9. The binary number system is a base-2 system because it contains two
digits, 0 and 1. The position of the 0 or 1 in a binary number indicates its value
within the number. This is referred to as its place value or weight. The place value
of the digits in a binary number increases by powers of two.

Counting in binary starts with the numbers 0 and 1. When each digit has been used
in the 1's place, another digit is added in the 2's place and the count continues with
10 and 11. This uses up all combinations of two digits, so a third digit is added in
the 4's place and the course continues with 100, 101, 110, and 111. Now a fourth
digit is needed in the 8's place to continue and so on. Figure 32-1 shows the binary
counting sequence.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 1
Prepared by: Joereen T. Lumuthang, College of Education
University of Eastern Philippines Page 2
BINARY AND DECIMAL CONVERSION

As stated, a binary number is a weighted number with a place value. The value of
a binary number can be determined by adding the product of each digit and its
place value. The method for evaluating a binary number is shown by the following
example:

EXAMPLE:

Place Value

32 16 8 4 2 1

Binary number: 1 0 1 1 0 1

Value: 1 X 32 = 32

0X 16 = 0

1 x 8 =8

Ix4 =4

0x2 =0

+1X1 = 1

1011012 = 4510

The number 45 is the decimal equivalent of the binary number 101101.

Fractional numbers can also be represented in binary form by placing digits to the
right of the binary zero point, just as decimal numbers are placed to the right of the

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 3
decimal zero point. All digits to the right of the zero point have weights that are
negative powers of two, or fractional place values.

Power Place

of 2 value

25 = 32

24 = 16

23 = 8

22 = 4

21 = 2

20 = 1

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 4
EXAMPLE: Determine the decimal value of the binary number 11101l.011.

Binary Number Place value Value

1 X 32 = 32

1 X 16 = 16

1 x 8 =8

0 X 4 =0

1 X 2 =2

1 x 1 =1

0 x 0.5 =0

1 x 0.25 = 0.25

+1 X 0.125 = 0.125

111011.0112 = 59.37510

In working with digital equipment, it is often necessary to convert from binary to


decimal form and vice versa. The most popular way to convert decimal numbers to
binary numbers is to progressively divide the decimal number by 2, writing down
the remainder after each division. The remainders, taken in reverse order, form the
binary number.

EXAMPLE: To convert 1110 to a binary number, progressively divide by 2 (LSB =


least significant bit).

11 ÷ 2 = 5 with a remainder of 1 LSB

5 ÷ 2 = 2 with a remainder of 1

2 ÷ 2 = l with a remainder of 0

1 ÷ 2 = 0 with a remainder of 1

(1/2 0 means that 2 will no longer divide into 1, so l is the remainder.) Decimal 11 is
equal to 1011 in binary.

The process can be simplified by writing the numbers in an orderly fashion as


shown for converting 2510 to a binary number.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 5
Decimal number 25 is equal to binary number 11001

Fraction numbers are done a little differently: The number is multiplied by 2 and the carry is
recorded as the binary fraction.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 6
OCTAL NUMBERS

Years ago computers used octal numbers for representing binary numbers. Using octal
numbers allows the reading of large binary numbers by breaking the binary number into
groups of three. This speeded up the entering and reading of binary numbers from a
computer resulting in reduced error.

Figure 32-2 shows octal numbers with their decimal and binary equivalents. The
advantage is that octal numbers are converted directly from three bits of binary numbers.
The octal number system is referred to as base-8. There are only eight digits (0-7) and
then it recycles like decimal (0-9).

To convert binary to an octal number requires dividing the binary number into groups of
three starting from the right as shown by the following example:

EXAMPLE

Binary number 1001010011100001110102

Separate into groups of three: 100 101 001 110 000 111 0102

Convert to octal: 100 101 001 110 000 111 010 2

4 5 1 6 0 7 28

Octal equivalent is: 45160728

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 7
To convert an octal number to a binary equivalent requires reversing the process and
converting the octal number to binary groups of three as shown by the following example

EXAMPLE:

Octal number: 16720548

Separate the numbers: 1 6 7 2 0 5 48

Convert to binary: 001 110 111 010 000 101 100 2

Binary equivalent: 0011101110100001011002

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 8
Lead zeros can be dropped resulting in:

11101110100001011002

Like binary numbers, each octal number is a weighted number with a place value. The
value of an octal number can be determined by adding the product of each digit and its
place value. Figure 32-3 shows octal place values. The method for converting an octal
number to a decimal is shown by the following example:

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 9
HEXADECIMAL NUMBERS

The hexadecimal number system is used primarily for entering and reading data of
microprocessor based 4, 8, 16, 32, and 64-bit systems. Using hexadecimal numbers
allows the breaking of a binary number into groups of four to reduce change of error when
entering data.

The hexadecimal number system is referred to as base 16. There are sixteen digits:
0,1,2,3,4,5, , 7, 8, 9, A, B, C, D, E, and F. Figure 32-4 shows hexadecimal numbers with
their, decimal and binary equivalents. The advantage of hexadecimal numbers is they are
converted directly from four bits of binary numbers.

To convert binary to a hexadecimal number requires dividing the binary number into
groups of four starting from the right as shown by the following example:

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 10
Prepared by: Joereen T. Lumuthang, College of Education
University of Eastern Philippines Page 11
EXAMPLE:

Binary number 1001010011100001110102

Separate into groups of three to hexadecimal: 1 0010 1001 1100 0011 10102

Convert to hexadecimal: 1 0010 1001 1100 0011 10102

1 2 9 C 3 A16

Hexadecimal equivalent is: 129C3A16

To convert a hexadecimal number to a binary equivalent requires reversing the process


converting the hexadecimal number to binary groups of four as shown by the following
example

EXAMPLE:

Separate the numbers: 3 A 7 F 4 D 2 C

Octal number: 3A7F4D2C16

Convert to binary: 0011 1010 0111 1111 0100 1101 0010 11002

Binary equivalent: 001110100111111101001101001011002

Lead zeros can be dropped, resulting in:

1110100111111101001101001011002

Like binary numbers, each hexadecimal number is a weighted number with a place value.

The value of a hexadecimal number can be


determined by adding the product of each digit and
its place value. Figure 32-5 shows hexadecimal
place values. The method for converting a
hexadecimal number to a decimal is shown by the
following example:

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 12
Prepared by: Joereen T. Lumuthang, College of Education
University of Eastern Philippines Page 13
BCD CODE

An 8421 code is a binary-coded-decimal (BCD) code consisting of four binary digits. It is


used to represent the digits 0 through 9. The 8421 designation refers to the binary weight
of the 4 bits

Powers of 2: 23 22 21 20

Binary weight: 8 4 2 1

The main advantage of this code is that it permits easy conversion between decimal and
binary form. This is the predominant BCD code used and is the one referred to unless
otherwise stated.

Each decimal digit (0 through 9) is represented by a binary combination as follows:

Decimal 8421 code

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

Althougn sixteen numbers (24) can be represented by four binary positions, the six code
combinations above decimal 9 (1010, 1011, 1100, 1101, 1110, and 1111) are invalid in
the 8421 code.

To express any decimal number in the 8421 code, replace each decimal digit by the
appropriate 4-bit code.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 14
EXAMPLE: Convert the following decimal numbers into a BCD code: 5, 13, 124, 576,
8769.

EXAMPLE

5 = 0101

13 = 0001 0011

124 = 0001 0010 0100

576 = 0101 0111 0110

8769 = 1000 0111 0110 1001

To determine a decimal number from an 8421 code number, break the code into groups
of 4 bits. Then write the decimal digit represented by each 4-bit group.

EXAMPLE: Find the decimal equivalent for each of the following BCD codes:
10010101, 1001000, 1100111, 1001100101001, 1001100001110110.

1001 0101 = 95

0100 1000 = 48

0110 0111 = 67

0001 0011 0010 1001 = 1329

1001 1000 0111 0110 = 9876

Note: If there is an insufficient number of bits in the group furthest to the left, zeros are
implied.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 15
Basic Logic Gates

AND GATE

The AND gate is a logic circuit that has two or more inputs and a single output. The AND
gate produces an output of 1, only when all its inputs are 1s. If any of the inputs are 0s,
the output is 0.

Figure 33-1 shows the standard symbol used for AND gates. An AND gate can have any
number of inputs greater than one. Shown in the figure are symbols representing the
more commonly used gates of two, three, four, and eight inputs.

The operation of the AND gate is summarized by the table in Figure 33-2. Such a table,
called a truth table, shows the output for each possible input. The inputs are designated
A and B. The output is designated Y. The total number of possible combinations in the
truth table is determined by the following formula:

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 16
The AND gate performs the basic operation of multiplication. Multiplication is known as
the AND function. The output of an AND gate is represented by the equation Y = A B or
Y = AB. The AND function is represented by the dot between the two variables A and B.

OR GATE

An 0R gate produces a 1 output if any of its inputs are 1s. The output is a 0 if all the inputs
are 0s. The output of a two-input OR gate is shown in the truth table in Figure 33-3. The
total number of possible combinations is expressed by N = 22 = 4. The truth table shows
all four combinations.

An OR gate performs the basic operation of addition. The algebraic expression for the
output of an OR gate is Y = A + B. The plus sign designates the UR function.

Figure 33-4 shows the logic symbol for an OR gate. The inputs are labeled A and B, and
the output is labeled Y. An OR gate can have any number of inputs greater than one.
Shown in the figure are OR gates with two, three, four, and eight inputs.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 17
NOT GATE.

The simplest logic circuit is the NOT gate. It performs the function called inversion, or
complementation, and is commonly referred to as an inverter.

The purpose of the inverter is to make the output state the opposite of the input state. The
two states associated with logic circuits are 1 and 0. A1 state can also be referred to as
a high, to indicate that the voltage is higher than in the 0 state. A 0 state can also be
referred to as a low, to indicate that the voltage is lower than in the 1 state. If a 1, or high,
is applied to the input of an inverter, a low, or 0, appears on its output. If a 0, or low, is
applied to the input, a 1, or high, appears on its output.

The operation of an inverter is summarized in Figure 33-5. The input to an inverter is


labeled A and the output is labeled A (read "ANOT" or "NOT A"). The bar over the letter
A indicates the complement of A. Because the inverter has only one input, only two input
combinations are possible.

The symbol used to represent an inverter or NOT function is shown in Figure 33-6. The
triangle portion of the symbol represents the circuit, and the circle or "bubble" represents
the circuit inversion or complementary characteristic. The choice of symbol depends on
where the inverter is used. If the inverter uses a 1 as the qualifying input, the symbol in
Figure 33-6A is used. If the inverter uses a 0 as the qualifying input, the symbol in Figure
33-6B is used.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 18
NAND GATE

A NAND gate is a combination of an inverter and an AND gate. It is called a NAND gate
from the NOT-AND function it performs. The NAND gate is the most commonly used logic
function. This is because it can be used to construct an AND gate, OR gate, inverter, or
any combination of these functions.

The logic symbol for a NAND gate is shown in Figure 33-7. Also shown is its equivalent
to an AND gate and an inverter. The bubble on the output end of the symbol means to
invert te

AND function.

Figure 33-8 shows the truth table for a two-input NAND gate. Notice that the output of the
NAND gate is the complement of the output of an AND gate. Any 0 in the input yields a 1
output.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 19
The algebraic formula for NAND-gate output is Y = AB, where Y is the output and A and
B are the inputs. NAND gates are available with two, three, four, eight, and thirteen inputs.

NAND gates are the most widely available gates on the market. The availability and
flexibility or the NAND gate allows it to be used for other types of gates. Figure 33-9 shows
how a NAND gate can be used to generate other logic functions.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 20
NOR GATE

A NOR gate is a combination of an inverter and an OR gate. Its name derives from its
NOT-OR function. Like the NAND gate, the NOR gate can also be used to construct an
AND gate and OR gate, and an inverter. The logic symbol for the NOR gate is shown in
Figure 33-10. Also shown is its equivalent to an OR gate and an inverter. The bubble on
the output of the symbol means to invert the function.

Figure 33-11 shows the truth table for a two-input NOR gate. Notice that the output is the
complement of the OR-function output. A1 occurs only when 0 is applied to both inputs.A1
input produces a 0 output.

The algebraic expression for NOR-gate output is Y = A + B, where Y is the output and A
and B are the inputs. NOR gates area available with two, three, four, and eight inputs.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 21
EXCLUSIVE OR AND NOR GATES

A less common but still important gate is called an exclusive OR gate, abbreviated as
XOR. An XOR gate has only two inputs, unlike the OR gate, which may have several
inputs. However, the XOR is similar to the OR gate in that it generates a 1 output if either
input is a 1. The exclusive OR is different when both inputs are 1s or Os. In that case, the
output is a 0.

The symbol for an XOR gate is shown in Figure 33-12. Also shown is the equivalent logic
circuit. Figure 33-13 shows the truth table for an exclusive OR gate. The algebraic output
is written as Y = A+B. It is read as "Y equals A exclusive or B."

The complement of the XOR gate is the XNOR (exclusive NOR) gate. Its symbol is shown
in Figure 33-14. The bubble on the output implies inversion or complement. Also shown
is the equivalent logic circuit. Figure 33-15 shows the truth table for an exclusive NOR
gate. The algebraic output is written as Y= ASB, read as "Y equals A exclusive nor B."

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 22
BUFFER

A buffer is a special logic gate that isolates conventional gates from other circuitry and
provides a high driving current for heavy circuit loads or fan-out. Buffers provide
noninverting input and output. A 1 in provides a 1 out and a 0 in provides a 0 out. Figure
33-16 shows the schematic symbol for a basic buffer with its truth table.

Another type of buffer is the three (3)-state buffer shown with its truth table in Figure 33-
17.

The 3-state buffer has the usual 1 and 0 output states but it also has a third state, which
is referred to as a high-impedance state. This state provides an open circuit between the
input circuitry and the output and is controlled by the EN line. The EN line represents an
enable/disable control input. Figure 33-18 shows how the 3-state buffer operates.

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 23
Prepared by: Joereen T. Lumuthang, College of Education
University of Eastern Philippines Page 24
Suggested Readings

Fowler, R. (2013). Electricity, Principles & Applications. Eight Edition. Mc McGraw-Hill


International Editions

There's a good, concise history of de Forest's invention, and how it was developed, in
"Chapter 1: A Microhistory of Microwave Technology." In Planar Microwave Engineering:
A Practical Guide to Theory, Measurement, and Circuits, Volume 1 by Thomas H. Lee.
Cambridge University Press, 2004.

References/Sources

Gates, Earl. 2012. Electronics, An Introduction. Sixth Edition. Cengage Learning.

Tan, M & Cunanan, R. K to 12 Basic Education Curriculum Technology and Livelihood


Education Learning Module-CONSUMER ELECTRONICS Servicing NC II. Department
of Education

Catequista, L et al. 2008. Competency Based-Learning Material. Building Wiring


Installation II. Basic Electricity. Department of Education

https://www.electrical4u.com/diode-working-principle-and-types-of-diode/

https://www.electrical4u.com/what-is-transformer-definition-working-principle-of-
transformer/

https://www.electronics-notes.com/articles/electronic_components/transistor/how-does-
a-transistors-works-basics-tutorial.php

Woodford, C. 2020. Thyristors. Retrieved from https://www.explainthatstuff.com/how-


thyristors-work.html on March 19, 2021

https://www.electrical4u.com/integrated-circuits-types-of-ic/

https://www.explainthatstuff.com/amplifiers.html

Woodford, C. 2020. Thyristors. Retrieved from https://www.explainthatstuff.com/how-


thyristors-work.html on March 19, 2021

https://www.electrical4u.com/what-is-an-oscillator/

Prepared by: Joereen T. Lumuthang, College of Education


University of Eastern Philippines Page 25

You might also like