Download presentation
Presentation is loading. Please wait.
1
CHAPTER 1 : INTRODUCTION
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION
2
1.0 Number & Codes Digital and analog quantities
Decimal numbering system (Base 10) Binary numbering system (Base 2) Hexadecimal numbering system (Base 16) Octal numbering system (Base 8) Number conversion Binary arithmetic 1’s and 2’s complements of binary numbers
3
Signed numbers Arithmetic operations with signed numbers Binary-Coded-Decimal (BCD) ASCII codes Gray codes Digital codes & parity
4
Digital and analog quantities
Two ways of representing the numerical values of quantities : i) Analog (continuous) ii) Digital (discrete) Analog : a quantity represented by voltage, current or meter movement that is proportional to the value that quantity Digital : the quantities are represented not by proportional quantities but by symbols called digits
5
Digital and analog systems
Digital system: combination of devices designed to manipulate logical information or physical quantities that are represented in digital forms include digital computers and calculators, digital audio/video equipments, telephone system. Analog system: contains devices manipulate physical quantities that are represented in analog form audio amplifiers, magnetic tape recording and playback equipment, and simple light dimmer switch
6
Analog Quantities Continuous values
7
Digital Waveform
8
Introduction to Numbering Systems
We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are: Binary Base 2 Octal Base 8 Hexadecimal Base 16
9
Number Systems Decimal Binary Octal Hexadecimal 0 ~ 9 0 ~ 1 0 ~ 7
0 ~ F
10
Characteristics of Numbering Systems
The digits are consecutive. The number of digits is equal to the size of the base. Zero is always the first digit. When 1 is added to the largest digit, a sum of zero and a carry of one results. Numeric values determined by the implicit positional values of the digits.
11
A B C D E F Binary Octal Hex Dec N U M B E R S Y T
12
Most significant digit Least significant digit
Significant Digits Binary: Most significant digit Least significant digit Hexadecimal: 1D63A7A
13
Binary Number System Also called the “Base 2 system”
The binary number system is used to model the series of electrical signals computers use to represent information 0 represents the no voltage or an off state 1 represents the presence of voltage or an on state
14
Binary Numbering Scale
Base 2 Number Base 10 Equivalent Power Positional Value 000 20 1 001 21 2 010 22 4 011 3 23 8 100 24 16 101 5 25 32 110 6 26 64 111 7 27 128
15
Octal Number System Also known as the Base 8 System Uses digits 0 - 7
Readily converts to binary Groups of three (binary) digits can be used to represent each octal digit Also uses multiplication and division algorithms for conversion to and from base 10
16
Hexadecimal Number System
Base 16 system Uses digits 0-9 & letters A,B,C,D,E,F Groups of four bits represent each base 16 digit
17
Number Conversion Any Radix (base) to Decimal Conversion
18
Number Conversion Binary to Decimal Conversion
19
Binary to Decimal Conversion
Convert ( )2 to its decimal equivalent: Binary Positional Values x x x x x x x x 27 26 25 24 23 22 21 20 Products 17310
20
Octal to Decimal Conversion
Convert 6538 to its decimal equivalent: Octal Digits x x x Positional Values Products 42710
21
Hexadecimal to Decimal Conversion
Convert 3B4F16 to its decimal equivalent: Hex Digits 3 B F x x x x Positional Values Products 15,18310
22
Number Conversion Decimal to Any Radix (Base) Conversion
INTEGER DIGIT: Repeated division by the radix & record the remainder FRACTIONAL DECIMAL: Multiply the number by the radix until the answer is in integer Example: to Binary
23
Decimal to Binary Conversion
Remainder 2 5 = 2 1 2 = 6 = 3 = 1 = MSB LSB 2510 =
24
Decimal to Binary Conversion
MSB LSB Carry x 2 = x 2 = x 2 = 0.5 x 2 = The Answer:
25
Decimal to Octal Conversion
Convert to its octal equivalent: 427 / 8 = 53 R3 Divide by 8; R is LSD 53 / 8 = 6 R5 Divide Q by 8; R is next digit 6 / 8 = 0 R6 Repeat until Q = 0 6538
26
Decimal to Hexadecimal Conversion
Convert to its hexadecimal equivalent: 830 / 16 = 51 R14 51 / 16 = 3 R3 3 / 16 = 0 R3 = E in Hex 33E16
27
Number Conversion Binary to Octal Conversion (vice versa) Grouping the binary position in groups of three starting at the least significant position.
28
Octal to Binary Conversion
Each octal number converts to 3 binary digits To convert 6538 to binary, just substitute code:
29
Number Conversion Example: Convert the following binary numbers to their octal equivalent (vice versa). b) 47.38 Answer: 11.748
30
Number Conversion Binary to Hexadecimal Conversion (vice versa) Grouping the binary position in 4-bit groups, starting from the least significant position.
31
Binary to Hexadecimal Conversion
The easiest method for converting binary to hexadecimal is to use a substitution code Each hex number converts to 4 binary digits
32
Number Conversion Example: Convert the following binary numbers to their hexadecimal equivalent (vice versa). 1F.C16 Answer: 10.816
33
Substitution Code 56AE6A16 0101 0110 1010 1110 0110 1010 5 6 A E 6 A
Convert to hex using the 4-bit substitution code : A E A 56AE6A16
34
Substitution Code Substitution code can also be used to convert binary to octal by using 3-bit groupings:
35
Binary Addition 0 + 0 = 0 Sum of 0 with a carry of 0
Example: ???
36
Simple Arithmetic Addition Example: Example: 100011002 5816 + 1011102
Substraction 101102 Example: 5816 7C16
37
Binary Subtraction 0 - 0 = 0 1 - 1 = 0 1 - 0 = 1
10 -1 = with a borrow of 1 Example: ???
38
Binary Multiplication
0 X 0 = 0 0 X 1 = 0 Example: 1 X 0 = 1 X 1 = X 100110 000000
39
Binary Division Use the same procedure as decimal division
40
1’s complements of binary numbers
Changing all the 1s to 0s and all the 0s to 1s Example: Binary number ’s complement
41
2’s complements of binary numbers
Step 1: Find 1’s complement of the number Binary # 1’s complement Step 2: Add 1 to the 1’s complement
42
Signed Magnitude Numbers
… Sign bit 31 bits for magnitude 0 = positive 1 = negative This is your basic Integer format
43
Sign numbers Left most is the sign bit Sign-magnitude 1’s complement
0 is for positive, and 1 is for negative Sign-magnitude = +25 sign bit magnitude bits 1’s complement The negative number is the 1’s complement of the corresponding positive number Example: +25 is is
44
Sign numbers 2’s complement Example Express +19 and -19 in
The positive number – same as sign magnitude and 1’s complement The negative number is the 2’s complement of the corresponding positive number. Example Express +19 and -19 in i. sign magnitude ii. 1’s complement iii. 2’s complement
45
Digital Codes BCD (Binary Coded Decimal) Code Represent each of the 10 decimal digits (0~9) as a 4-bit binary code. Example: Convert 15 to BCD. BCD Convert 10 to binary and BCD.
46
Digital Codes ASCII (American Standard Code for Information Interchange) Code Used to translate from the keyboard characters to computer language
47
Digital Codes Decimal Binary Gray Code 0000 1 0001 2 0010 0011 3 4
0000 1 0001 2 0010 0011 3 4 0100 0110 5 0101 0111 6 The Gray Code Only 1 bit changes Can’t be used in arithmetic circuits Binary to Gray Code and vice versa.
48
END OF Number & Codes
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.