Docsity

Digital Techniques and Number Systems, Exercises of Technology

Toggle sidebar
bg1
University of Anbar Subject / Digital Techniques
College of Engineering Second Stage / 1st Semester
Dept. of Electrical Engineering (2017 โ€“ 2018)
ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€
1
University of Anbar
College of Engineering / Electrical Department
Digital Techniques Lectures
By
Mohammed Khaleel
pf3
pf4
pf5

Partial preview of the text

Download Digital Techniques and Number Systems and more Exercises Technology in PDF only on Docsity!

College of Engineering Second Stage / 1 st Semester

Dept. of Electrical Engineering (201 7 โ€“ 2018 )

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

University of Anbar

College of Engineering / Electrical Department

Digital Techniques Lectures

By

Mohammed Khaleel

College of Engineering Second Stage / 1 st Semester

Dept. of Electrical Engineering (201 7 โ€“ 2018 )

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

Number Systems:

Many number systems are in use in digital technology. The most common

are the decimal, binary, octal, and hexadecimal systems. The decimal system is

clearly the most familiar to us because it is the tool that we use every day.

Examining some of its characteristics will help us to better understand of other

systems.

Decimal System:

The decimal system is composed of 10 numerals or symbols. These symbols

are 0,1,2,3,4,5,6,7,8,9; using these symbols as digits of a number, we can express

any quantity. The decimal system is also called the base-10 system. The decimal

system is a positional-value system in which the value of a digit depends on its

position. For example, consider the decimal number 453. We know that the digit 4

actually represents 4 hundreds (400), the 5 represents 5 tens (50), and 3 represents

3 units.

In essence, the 4 carries the most weight of these digits; itโ€™s referred to us

the most significant digit (MSD). The 3 carries the least weight and is called the

least significant digit (LSD).

Example: consider the decimal number 27.35; this number is actually equal to:

2 ร— 10 + 7 ร— 1 + 3 ร— 0. 1 + 5 ร— 0. 01

The decimal point is used to separate the integer and the fractional parts of the

number.

10

1

10

0

10

- 1

10

- 2

(MSD) (LSD)

College of Engineering Second Stage / 1 st Semester

Dept. of Electrical Engineering (201 7 โ€“ 2018 )

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

Example: find the decimal equivalent of the 0.1101?

As far as mixed numbers are concerned (number that have an integer and

fractional part), the weights for a mixed number are:

Hence: 0. (2)

(10)

Example: convert binary 110.001 to a decimal number

Decimal-to-Binary Conversion:

One way to convert a decimal number into its binary equivalent is to reverse

the process described in the binary to decimal conversion paragraph. For instance,

suppose you want to convert decimal 9 into the corresponding binary number. All

you need to do is express 9 as a sum of power of 2, and then write 1โ€™s and 0โ€™s in

the appropriate positions.

3

2

1

0

- 1

- 2

etc. - 3 etc.

- Binary Point

2

- 1

2

- 3

2

- 4

2

- 2

0.5+0.25+0.0625=0.

2

0 .

0

2

2

2

0

.

2

1

2

- 1

2

- 2

2

- 3

(Binary)

3

2

0

2

1

College of Engineering Second Stage / 1 st Semester

Dept. of Electrical Engineering (201 7 โ€“ 2018 )

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

As another example,

Amore popular way to convert decimal number to binary numbers is the

(repeated division). This method requires repeatedly dividing the decimal number

by 2 and writing down the reminders after each division until a quotient of 0 is

obtained. Note that the binary result is obtained by writing the first reminder as the

LSB and the last reminder as the MSB. Let us convert decimal 25 to its binary

equivalent using the repeated division method.

As far as fractions are concerned, it is possible to multiply by 2 and record a carry

in the integer position. As an example, convert 0.625 to binary fraction.

By taking the carries in forward order,

we get (0.101) which is the binary

equivalent of 0.

(Binary)

1 1 0 1 0

2

25

=12 + Remainder 1

2

12

=6 + Remainder 0

2

6

=3 + Remainder 0

2

3

=1 + Remainder 1

2

1

=0 + Remainder 1

(10)

2

MSB

LSB

0.625ร—2=1.25 = 0.25 with a carry of 1

0.25ร—2=0.5 with a carry of 0

0.5ร—2=1.0 = 0 with a carry of 1

College of Engineering Second Stage / 1 st Semester

Dept. of Electrical Engineering (201 7 โ€“ 2018 )

ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€ู€

Octal-to-Decimal Conversion:

An octal number can be easily converted to its decimal equivalent by

multiplying each octal digit by its positional weight. For example:

Example: convert 24. (8)

to its decimal equivalent.

Decimal-to-Octal Conversion:

A decimal integer can be converted to octal by using the same repeated

division method that have been used in the decimal-to-binary conversion, but with

a division factor of 8 instead of 2. An example is shown below:

For decimal fractions, multiplying instead of dividing, writing the carry into the

integers position. An example of this is to convert 0.23 into an octal fraction.

(8)

=3ร—

2

+7ร—

1

+2ร—

0

=3ร—64+7ร—8+2ร—1=

(10)

(8)

=2ร—

1

+4ร—

0

+6ร—

  • 1

=2ร—8+4ร—1+6ร—0.125=20.

(10)

8

266

=33 + Remainder 2

8

33

= 4 + Remainder 1

8

4

= 0 + Remainder 4

(10)

(8)

0.23ร—8=1.84 = 0.84 with a carry of 1

0.84ร—8=6.72 = 0.72 with a carry of 6

0.72ร—8=5.76 = 0.76 with a carry of 5