The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

This first edition of Digital Electronics: Part 1 Numbering System is to expose students with a simple methods and calculations for a basic numbering and code systems. It is part of the Diploma in Electrical and Electronic Engineering and Diploma in Electronic Engineering (Communication) course, which aim to emphasize students on the digital system fundamentals and applications.

The approach used in Digital Electronics: Part 1 Numbering System allows students to master the all-important fundamental concepts, example, and exercise on how to convert from numbering system includes base-2, base-8, base 10 and base-16. In addition, this e-book help students to solve the problem related to addition and subtraction operations using 2’s complement and learn how to decode the decimal digits to Binary Coded Decimal (BCD) and American Standard Code for Information Interchange (ASCII).

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by samsawibujang, 2022-10-26 00:22:01

Digital Electronics Part 1 Numbering System

This first edition of Digital Electronics: Part 1 Numbering System is to expose students with a simple methods and calculations for a basic numbering and code systems. It is part of the Diploma in Electrical and Electronic Engineering and Diploma in Electronic Engineering (Communication) course, which aim to emphasize students on the digital system fundamentals and applications.

The approach used in Digital Electronics: Part 1 Numbering System allows students to master the all-important fundamental concepts, example, and exercise on how to convert from numbering system includes base-2, base-8, base 10 and base-16. In addition, this e-book help students to solve the problem related to addition and subtraction operations using 2’s complement and learn how to decode the decimal digits to Binary Coded Decimal (BCD) and American Standard Code for Information Interchange (ASCII).

Keywords: Digital Electronics

D IGITAL
ELEC TRO N IC S

PA RT 1

NUM BERING SYSTEM

“Makeiteasy,don’ttakeiteasy”

SamsawiBujang
Ts.Dr.MuhammadSufyanSafwanMohamadBasir

D IGITAL
ELEC TRO N IC S

PA RT 1

NUM BERING SYSTEM

“Makeiteasy,don’ttakeiteasy”

SamsawiBujang
Ts.Dr.MuhammadSufyanSafwanMohamadBasir

Digital Electronics Part 1 Numbering System

Published by POLITEKNIK MUKAH

Km. 7.5, Jalan Oya 96400 Mukah Sarawak
Tel: 084-874001
Fax: 084-874005

Website: http://www.pmu.edu.my

Copyright © 2022

All rights reserved. No part of this publication can be reproduced, stored in retrieval
system or transmitted in any forms or by any means, electronic or mechanical including
photocopying, recording or otherwise without the prior permission of the copyright owner.

Perpustakaan Negara Malaysia Cataloguing-in-Publication Data

DIGITAL ELECTRONICS. PART 1, NUMBERING SYSTEM / Editor: Samsawi Bin Bujang,
Ts. Dr. Muhammad Sufyan Bin Mohamad Basir.
Mode of access: Internet
eISBN 978-967-2097-59-4
1. Digital electronics.
2. Numeration.
3. Government publications--Malaysia.
4. Electronic books.
I. Samsawi Bujang. II. Muhammad Sufyan Safwan Mohamad Basir, Ts., Dr.
621.381

PREFACE |i

Preface

This first edition of Digital Electronics: Part 1 Numbering System is to expose
students with a simple methods and calculations for a basic numbering and code
systems. It is part of the Diploma in Electrical and Electronic Engineering and
Diploma in Electronic Engineering (Communication) course, which aim to
emphasize students on the digital system fundamentals and applications.

The approach used in Digital Electronics: Part 1 Numbering System allows students
to master the all-important fundamental concepts, example, and exercise on how
to convert from numbering system includes base-2, base-8, base 10 and base-16.
In addition, this e-book help students to solve the problem related to addition and
subtraction operations using 2’s complement and learn how to decode the decimal
digits to Binary Coded Decimal (BCD) and American Standard Code for Information
Interchange (ASCII).

We hope that from this e-book, students will have a strong grounding in the
fundamentals of digital technology. The knowledge obtained will help students in
solving the critical task that they will be facing. Make it easy, but don’t take it easy.

Contents CONTENTS |i

PART 1 NUMBER SYSTEM PAGE

GENERAL OUTCOMES 1

1.0 NUMBERING SYSTEM 2
1.1 Problem Solving 1 3
1.2 Problem Solving 2 4
1.3 Problem Solving 3 5
1.4 Problem Solving 4 6
1.5 Problem Solving 5 7
1.6 Problem Solving 6 8
1.7 Problem Solving 7 9
1.8 Problem Solving 8 10
1.9 Problem Solving 9 11
1.10 Problem Solving 10 12
1.11 Problem Solving 11 13
1.13 Problem Solving 12 14
1.14 Problem Solving 13 15
1.15 Problem Solving 14 16
1.16 Problem Solving 15 17
1.17 Problem Solving 16 18
1.18 Problem Solving 17 19
1.19 Problem Solving 18 20
1.20 Problem Solving 19 21

1.21 Problem Solving 20 C O N T E N T S | ii
1.22 Problem Solving 21
1.23 Problem Solving 22 PAGE
1.24 Problem Solving 23
1.25 Problem Solving 24 22
23
2.0 2nd COMPLIMENT 24
2.1 Problem Solving 1 25
2.2 Problem Solving 2 26
2.3 Problem Solving 3
2.4 Problem Solving 4 27
2.5 Problem Solving 5 28
29
2.0 BINARY CODES 30
2.1 Problem Solving 1 31
2.2 Problem Solving 2 32
2.3 Problem Solving 3
2.4 Problem Solving 4 33
2.4 Problem Solving 5 34
35
SELF-ASSESMENT 36
37
REFERENCES 38

39

NUMBER SYSTEM |1

NUMBER SYSTEM

GENERAL outcomes

PART 1) Understand decimal number system, binary
number system, octal number system and

hexadecimal number system

1 2) Know to convert the number from one system
to another

3) Solve problems in addition and subtraction
operations using 2’s complement

4) Apply binary codes used in computers

representing decimal digits, alphanumeric

characters and symbols

NUMBER SYSTEM |2

NUMBERING SYSTEM

01 Decimal → Base 10 (N10)
02 Binary → Base 2 (N2)
03 Octal → Base 8 (N8)
04 Hexadecimal → Base 16 (N16)

NUMBER SYSTEM |3

SOLVE ME….

“Improve yourself”

1 Convert the following decimal number
to binary:

4010 ( N10 → N2 )

Solution:
quotient remainder

40
2 = 20 − − − − − 0

20
2 = 10 − − − − − 0

10 = 5 − − − − −0
2

5 1 0 1 0 0 02
2 = 2.5 − − − − 1
MSB LSB
2
2 = 1−−−−−0
1
2 = 0.5 − − − − − 1

Stop when whole number
quotient is zero.

NUMBER SYSTEM |4

SOLVE ME….

“Improve yourself”

2 Convert the following decimal number
to binary:

6110 ( N10 → N2 )

Solution:
quotient remainder

61
2 = 30.5 − − − − − 1

30
2 = 15 − − − − − 0

15 1 1 1 1 0 12
2 = 7.5 − − − − 1
7 MSB LSB
2 = 3.5 − − − − 1

3
2 = 1.5 − − − − − 1

1
2 = 0.5 − − − − − 1

Stop when whole number
quotient is zero.

NUMBER SYSTEM |5

SOLVE ME….

“Improve yourself”

3 Convert the following decimal number
to binary:

9810 ( N10 → N2 )

Solution:

quotient remainder

98
2 = 49 − − − − − 0

49 11000102
2 = 24.5 − − − − − 1
24 MSB LSB
2 = 12 − − − − 0
12

2 = 6−−−− 0
6
2 = 3−−−−−0
3
2 = 1.5 − − − − − 1
1
2 = 0.5 − − − − − 1

Stop when whole number
quotient is zero.

NUMBER SYSTEM |6

SOLVE ME….

“Improve yourself”

4 Convert the following decimal number
to binary:

0.312510 ( N10 → N2 )

Solution:
quotient remainder

0.3125 2 = 0.625 − − − 0

0.625 2 = 1.25 − − − 0
0.25 2 = 0.5 − − − 0

0.5 2 = 1 − − − 0

Stop when whole number
quotient is one.

0 .0 1 0 1 2

MSB LSB

NUMBER SYSTEM |7

SOLVE ME….

“Improve yourself”

5 Convert 35910 the decimal number to
octal:

35910 ( N10 → N8 )

Solution:
quotient remainder

359 = 44.875 → 0.875x8 → 7
8

44 → 0.5x8 → 4
8 = 5.5

5 547
8 = 0.625 → 0.625x8 → 5
8
MSD LSD

Stop when whole number
quotient is zero.

NUMBER SYSTEM |8

SOLVE ME….

“Improve yourself”

6 Convert 471210 the decimal number to
octal:

471210 ( N10 → N8 )

Solution: 111508
quotient remainder LSD
MSD
589
8 = 73.625 → 0.625 x 8 → 0

589
8 = 73.625 → 0.625 x 8 → 5
73
8 = 9.125 → 0.125 x 8 → 1
9
8 = 1.125 → 0.125 x 8 → 1
1
8 = 0.125 → 0.125 x 8 → 1

Stop when whole number
quotient is zero.

NUMBER SYSTEM |9

SOLVE ME….

“Improve yourself”

7 Convert 65010 the decimal number to
Hexadecimal:

65010 ( N10 → N16 )

Solution:
quotient remainder

650 → 0.635 x 16 → 10 (A)
16 = 40.625

40 → 0.5 x 16 → 8
16 = 2.5

2 2 8
16 = 0.125 → 0.125 x 16 → 2
16
MSD LSD

Stop when whole number
quotient is zero.

N U M B E R S Y S T E M | 10

SOLVE ME….

“Improve yourself”

8 Convert 565910 the decimal number to
Hexadecimal:

565910 ( N10 → N16 )

Solution:
quotient remainder

5659
16 = 353.6875 → 0.6875 x 16 → 11 (B)
353
16 = 22.0625 → 0.0625 x 16 → 1
22
16 = 1.375 → 0.375 x 16 → 6

1 2 6 1 16
16 = 0.125 → 0.125 x 16 → 2
MSD LSD
Stop when whole number
quotient is zero.

N U M B E R S Y S T E M | 11

SOLVE ME….

“Improve yourself”

9 Convert 5102310 the decimal number to
Hexadecimal:

51023410 ( N10 → N16 )

Solution:
quotient remainder

510234
16 = 31889.625 → 0.625 x 16 → 10 (A)

3188
16 = 1993.0625 → 0.0625 x 16 → 1

1993
16 = 124.5625 → 0.5625 x 16 → 9

124 7 9 1 16
16 = 7.75 → 0.75 x 16 → 12 (C) LSD
7 MSD
16 = 0.4375 → 0.4375 x 16 → 7

Stop when whole number
quotient is zero.

N U M B E R S Y S T E M | 12

SOLVE ME….

“Improve yourself”

10 Determine the decimal value of the binary
number 11011012.

11011012 ( N2 → N10

)

Solution:

Weight: 26 25 24 23 22 21 20

Binary number : 1 1 0 1 1 0 1

11011012 = 1 x 26 + 1 x 25 + 1x 23 + 1 x 22 + 1 x 20
= 64 + 32 + 8 + 4 + 1
= 10910

N U M B E R S Y S T E M | 13

SOLVE ME….

“Improve yourself”

11 Determine the decimal value of the binary
number 0.10112.

0.10112 ( N2 → N10 )

Solution:

Weight: 2-1 2-2 2-3 2-4

Binary number : . 1 0 1 1

11011012 = 1 x 2-1 + 1 x 2-3 + 1x 2-4
= 0.5 + 0.125 + 0.0625
= 0.687510

N U M B E R S Y S T E M | 14

SOLVE ME….

“Improve yourself”

12 Determine the decimal value of the binary
number 11011012.

101.1012 ( N2 → N10 )

Solution:

Weight: 22 21 20 2-1 2-2 2-3

Binary number : 1 0 1 . 1 0 1

101.1012 = 1 x 22 + 1 x 20 + 1x 2-1 + 1 x 2-3
= 4 + 1 + 0.5 + 0.125
= 5.62510

N U M B E R S Y S T E M | 15

SOLVE ME….

“Improve yourself”

13 Determine the decimal value of the octal
number 23748.

23748 ( N8 → N10 )

Solution:

Weight: 83 82 81 80

Binary number : 2 3 7 4

23748 = 2 x 83 + 3 x 82 + 7 x 81 + 4 x 80
= 1024 + 192 + 56 + 4
= 127610

N U M B E R S Y S T E M | 16

SOLVE ME….

“Improve yourself”

14 Determine the decimal value of the octal
number 14.358.

14.358 ( N8 → N10 )

Solution:

Weight: 81 80 8-1 8-2

Binary number : 1 4 . 3 5

14.358 = 1 x 81 + 4 x 80 + 3 x 8-1 + 5 x 8-2
= 8 + 4 + 0.375 + 0.078125
= 12.45312510

N U M B E R S Y S T E M | 17

SOLVE ME….

“Improve yourself”

15 Determine the decimal value of the
hexadecimal whole number E516.

E516 ( N16 → N10 )

Solution:

Weight: 161 160

Binary number : E 5

E516 = ( E x 161 ) + ( 5 x 160 )
= ( 14 x 16 ) + ( 5 x 1 )
= 224 + 5
= 22910

N U M B E R S Y S T E M | 18

SOLVE ME….

“Improve yourself”

16 Determine the decimal value of the
hexadecimal whole number 821A16.

821A16 ( N16 → N10 )

Solution:

Weight: 163 162 161 160

Binary number : 8 2 1 A

821A16 = ( 8 x 163 ) + ( 2 x 162 ) + ( 1 x 161 ) + ( 10 x 160 )
= ( 8 x 4096 ) + ( 2 x 256 ) + ( 1 x 16 ) + ( 10 x 1 )
= 32768 + 512 + 16 + 10
= 3330610

N U M B E R S Y S T E M | 19

SOLVE ME….

“Improve yourself”

17 Determine the binary value of the octal
number 6538.

6538 ( N8 → N2 )

Solution:

Each octal number converts to 3 binary digits
To convert 6538 to binary, just
substitute code:
65 3

110 101 011
6538 = 1101010112

N U M B E R S Y S T E M | 20

SOLVE ME….

“Improve yourself”

18 Determine the binary value of the octal
number 425178.

425178 ( N8 → N2 )

Solution:

Each octal number converts to 3 binary digits
To convert 425178 to binary, just
substitute code:
4 2 5 17

100 010 101 001 111
425178 = 1000101010011112

N U M B E R S Y S T E M | 21

SOLVE ME….

“Improve yourself”

19 Determine the binary value of the
Hexadecimal number 1E716.

1E716 ( N16 → N2 )

Solution:

Each hexadecimal number converts to 4 binary digits
To convert 1E716 to binary, just
substitute code:

1E 7

0001 1110 0111
1E716= 11111001112

N U M B E R S Y S T E M | 22

SOLVE ME….

“Improve yourself”

20 Determine the binary value of the
Hexadecimal number 2A3B916.

2A3B916 ( N16 → N2 )

Solution:

Each hexadecimal number converts to 4 binary digits
To convert 2A3B916 to binary, just
substitute code:

2 A 3 B9

0010 1010 0011 1011 1001
2A3B916= 1010100011101110012

N U M B E R S Y S T E M | 23

SOLVE ME….

“Improve yourself”

21 Convert 100110110000012 to octal number.

100110110000012 ( N2 → N8 )

Solution:

Each octal number converts to 3 binary digits
To convert 100110110000012 to
binary, just substitute code:

010 011 011 000 001

2 3 3 01
100110110000012= 233018

N U M B E R S Y S T E M | 24

SOLVE ME….

“Improve yourself”

22 Convert 1001110101101112 to octal number.

1001110101101112 ( N2 → N8 )

Solution:

Each octal number converts to 3 binary digits
To convert 1001110101101112 to
binary, just substitute code:

100 111 010 110 111

4 7 2 67
1001110101101112= 472678

N U M B E R S Y S T E M | 25

SOLVE ME….

“Improve yourself”

23 Convert 100110110110000012 to Hexadecimal
number.

100110110110000012 ( N2 → N16 )

Solution:

Each hexadecimal number converts to 4 binary digits
To convert 100110110110000012 to
binary, just substitute code:

0001 0011 0110 1100 0001

1 3 6 C1
100110110110000012= 136C116

N U M B E R S Y S T E M | 26

SOLVE ME….

“Improve yourself”

24 Convert 1110101011112 to Hexadecimal
number.

1110101011112 ( N2 → N16 )

Solution:

Each hexadecimal number converts to 4 binary digits
To convert 1110101011112 to binary,
just substitute code:

1110 1010 1111

EA F
1110101011112= EAF16

N U M B E R S Y S T E M | 27

2nd COMPLIMENT

Basic rules in Basic rules
binary for binary
addition subtraction

01 0 + 0 = 0 01 0 - 0 = 0

02 0 + 1 = 1 02 1 - 0 = 1

03 1 + 0 = 1 03 1 - 1 = 0

04 1 + 1 = 1 0 04 1 0 - 1 = 1

05 1 + 1 + 1 = 1 1 -

1st Compliment 2nd Compliment

N U M B E R S Y S T E M | 28

SOLVE ME….

“Improve yourself”

1 Solve the arithmetic equation below by
using 8 bit two’s compliment method

(-710) + (-1910)

Solution:

+7 = 00000111
1st Compliment 11111000

+1
2nd Compliment 11111001

-7 = 11111001

+19 = 00010011
1st Compliment 11101100

+1
2nd Compliment 11101101

-19 = 11101101

11111001 Answer: 11100 1102
+ 11101101

111100 110

discard

N U M B E R S Y S T E M | 29

SOLVE ME….

“Improve yourself”

2 Solve the arithmetic equation below by
using 8 bit two’s compliment method

(-2110) + (1810)

Solution:

+21 = 00010101
1st Compliment 11101010

+1
2nd Compliment 11101011

-21 = 11101011

+18 = 00010010

No need convert to 2nd Compliment
because the question just need in

positive number

11101011
+ 00010010

11111 101

Answer: 11111 1012

N U M B E R S Y S T E M | 30

SOLVE ME….

“Improve yourself”

3 Solve the arithmetic equation below by
using 8 bit two’s compliment method

(4210) + (-3210)

Solution:

+42 = 00101010

No need convert to 2nd Compliment
because the question just need in

positive number

+32 = 00100000
1st Compliment 11011111

+1
2nd Compliment 11100000

-32 = 11100000

00101010 Answer: 0000 10102
+ 11100000

100001 010

discard

N U M B E R S Y S T E M | 31

SOLVE ME….

“Improve yourself”

4 Solve the arithmetic equation below by
using 8 bit two’s compliment method

(-1010) - (910)

Solution:

+10 = 00001010
1st Compliment 11110101

+1
2nd Compliment 11110110

-10 = 11110110

+9 = 00001001

No need convert to 2nd Compliment
because the question just need in

positive number

11110110
- 00001001

11101 101

Answer: 11101 1012

N U M B E R S Y S T E M | 32

SOLVE ME….

“Improve yourself”

5 Change following numbers 2120C16 to
BCD code by applying correct method

(-810) + (-1910)

Solution:

+8 = 00001000
1st Compliment 11110111

+1
2nd Compliment 11111000

-8 = 11111000

+19 = 00010011
1st Compliment 11101100

+1
2nd Compliment 11101101

-19 = 11101101

11111000
- 11101101

00001011

Answer: 000010112

N U M B E R S Y S T E M | 33

Binary codes

BINARY

01 CODED 02 ASCII CODES
DECIMAL
ASCII TABLE
(BCD)

23 22 21 20
8 4223 1

N U M B E R S Y S T E M | 34

SOLVE ME….

“Improve yourself”

1 Change decimal number 213010 to BCD code
by applying correct method.

21302 ( N10 → BCD )

Solution:

Decimal 2 1 3 0 10
Number : 0010 0001 0011 0000 BCD
BCD Code :

213010 = 0010 0001 0011 0000 BCD

N U M B E R S Y S T E M | 35

SOLVE ME….

“Improve yourself”

2 Change decimal number 213010 to BCD code
by applying correct method.

19802 ( N10 → BCD )

Solution:

Decimal 1 9 8 0 10
Number : 0001 1001 1000 0000 BCD
BCD Code :

198010 = 0001 1001 1000 0000 BCD

N U M B E R S Y S T E M | 36

SOLVE ME….

“Improve yourself”

3 Change following number 32B16 to BCD code
by applying correct method.

821A16 ( N16 → BCD )

Solution:

Weight: 163 162 161 160

Binary number : 8 2 1 A

821A16 = ( 8 x 163 ) + ( 2 x 162 ) + ( 1 x 161 ) + ( 10 x 160 )
= ( 8 x 4096 ) + ( 2 x 256 ) + ( 1 x 16 ) + ( 10 x 1 )
= 32768 + 512 + 16 + 10
= 3330610

Decimal 3 3 3 0 6 10
Number : 0011 0011 0011 0000 0110 BCD
BCD Code :

3330610 = 0011 0011 0011 0000 0110 BCD

N U M B E R S Y S T E M | 37

SOLVE ME….

“Improve yourself”

Change data information below to ASCII

4 code using code table.

44 45 45 32 30 30 33 33

20 45 61 73 79 3E

Solution:

Data: 44 45 45 32 30 30 33 33 20 45 61 73 79 3E

ASCII: D E E 2 0 0 3 3 Easy>

DEE20033 Easy>

N U M B E R S Y S T E M | 38

SOLVE ME….

“Improve yourself”

Change data information below to ASCII

5 code using code table.

4E 65 76 65 72 20 47 69

76 65 4E

Solution:

Data: 4E 65 76 65 72 20 47 69 76 65 4E

ASCII: N e v e r Gi v e N

Never GiveN

N U M B E R S Y S T E M | 39

SELF-ASSESMENT

1. Convert the following number by completing the Table 1.

Decimal Octal Table 1 BCD
18 252 Hex Binary

167

1000011

0001 0100
0101 0100

Answ Row 1: 18, 22, 12, 10010, 0001 1000
Answ Row 2: 170, 252, AA, 10101010, 0001 0111 0000
Answ Row 3: 359, 547, 167, 101100111, 0011 0101 1001

Answ Row 4: 67, 103, 43, 1000011, 0110 0111
Answ Row 5: 1454, 2656, 5AE, 10110101110, 0001 0100 0101 0100

2. Convert 138.C16 in decimal equivalent

N U M B E R S Y S T E M | 40

Answ: 312.7510

3. Determine 53108 in binary equivalent.

Answ: 1100110010002

4. Compute the following operations in the 2’s complement system. Use 8
bits (including the sign bit) for each number.
-3010 + (-1110)
Answ: 110101112

5. Solve the arithmetic equation below by using 8 bit two’s compliment
method.
-1310 + (-2110)
Answ: 111111102

6. Solve the arithmetic equation below by using 8 bit two’s compliment
method.
(-810) + (-5710)
Answ: 101111112

7. Convert the BCD code 1001 0011 0110 BCD to its equivalent binary
number.
Answ: 11101010002

8. Convert the BCD code 0101 1001 0100 BCD to its equivalent binary
number.
Answ: 11011010002

9. Change data information below to ASCII code using ASCII code table.

N U M B E R S Y S T E M | 41
4E 65 76 65 72 20 47 69 76 65 20 55 70 2E

Answ: Never Give Up.

10. Change data information below to ASCII code using ASCII code table.
3C 44 45 45 32 30 30 33 33 20 69 72 20 45
Answ: <DEE20033 is Easy>

References |

References

Ronald J.Tocci and Neal S.Widmer (1998). Digital systems-Principles and
Applications (7th Ed.). Prentice Hall, Inc. (ISBN: 0-13-649492-7).

Thomas L. Floyd (1997), Digital Fundamentals (6th Ed.). Prentice Hall, Inc.
(ISBN: 0-13-573478-9)

Salina Muhamad and Muhammad Nazir Mohammad Khalid (2017).
Fundamental of Digital Electronics. Oxford Fajar Sdd. Bhd. (ISBN: 978 983
47 2139 8)


Click to View FlipBook Version