Linking two single switches (as above) replaces double switch
COUNTING IN DECIMAL AND BINARY
• Number System -
Code using symbols that refer to a number of items.
• Decimal Number System -
Uses ten symbols (base 10 system)
• Binary System -
Uses two symbols (base 2 system)
PLACE VALUE
• Numeric value of symbols in different positions.
• Example - Place value in binary system:
Place Value 8s 4s 2s 1s
Binary Yes Yes No No
Number 1 1 0 0
RESULT: Binary 1100 = decimal 8 + 4 + 0 + 0 = decimal 12
BINARY TO DECIMAL CONVERSION
Convert Binary Number 110011 to a Decimal Number: |
Binary
1 1 0 0 1 1
51 |
DECIMAL TO BINARY CONVERSION
Divide by 2 Process |
Decimal # 13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
1 1 0 1 |
Example
Decimal number (592):
Number | Symbol Value | Position from the right end | Positional Value | Decimal Equivalent |
5 9 2 | 2 9 5 | 0 1 2 | 100 101 102 | 2*100 = 2 9*101 = 90 5*102 = 500 592 |
Binary number system
• Uses two digits, 0 and 1.
• Also called base 2 number system
|
Cont…
A Decimal number can converted into binary number by the following methods:
• Double-Dabble Method
• Direct Method
Double-Dabble Method
• Divide the number by 2
• Write the dividend under the number . This become the new number
• Write the remainder at the right in column
• Repeat these three steps until a ‘0’ is produced as a new number
• Output (bottom to top).
Convert decimal 17 into binary number
Step | Remainder | ||
1 | Divide 17 by 2 | 2 17 8 | 1 |
2 | Divide 8 by 2 | 2 8 4 | 0 |
3 | Divide 4 by 2 | 2 4 2 | 0 |
4 | Divide 2 by 2 | 2 2 1 | 0 |
5 | Divide 1 by 2 | 2 1 0 | 1 |
Direct Method
• Write the positional values of the binary number
|
….
•
45 |
64 32 16 8 4 2 1
1
• Subtract the positional value to the decimal number
i.e ( 45-32=13)
Cont.. 45
64 | 32 | 16 | 8 | 4 | 2 | 1 | |
1 | 45-32 =13 | ||||||
1 | 1 | 13-8=5 | |||||
1 | 1 | 1 | 5-4=1 | ||||
1 | 1 | 1 | 1 | 1-1=0 |
Place 0 at the rest of position value
0 1 0 1 1 0 1
(45)10=(101101)2
Decimal number to fractional Binary number
• Multiply the decimal fraction by 2
|
|
• Write the integer part in a column
• The fraction part become a new fraction
• Repeat step 1 to 3 until the fractional part become zero.
• Once the required number of digits (say 4) have been obtained , we
can stop.
Example
• Decimal number is (0.625)
Fractional decimal number | Operation | Product | Fractional part of product | Integer part of product |
0.625 | Multiply by 2 | 1.250 | .250 | 1 |
0.250 | -do- | 0.500 | .500 | 0 |
0.500 | -do- | 1.000 | 0 | 1 |
Ans: (0.625)10= (0.101)2
ELECTRONIC TRANSLATORS
Devices that convert from decimal to binary numbers and from binary to decimal numbers. |
Encoders -
translates from decimal to binary Decoders -
Translates from binary to decimal
ELECTRONIC ENCODER - DECIMAL TO BINARY
Binary output
5 |
0 0 01 00 01 |
7 |
0 1 1 1 |
0 0 1 1 |
3 |
Decimal to Binary Encoder |
•
0 |
• This encoder translates from decimal input to binary (BCD) output.
ELECTRONIC DECODING: BINARY TO DECIMAL
0 0 0 0 |
0 0 0 1 |
0 0 1 0 |
0 0 1 1 |
Binary-to- 7-Segment Decoder/ Driver |
0 1 0 0 |
• Electronic decoders are available in IC form.
• This decoder translates from binary to decimal.
• Decimals are shown on an 7-segment LED display.
• This decoder also drives the 7-segment display.
HEXADECIMAL NUMBER SYSTEM
Uses 16 symbols -Base 16 System 0-9, A, B, C, D, E, F |
Decimal 1
9
10
15
16
Binary 0001
1001
1010
1111
10000
Hexadecimal 1
9
A F 10
HEXADECIMAL AND BINARY CONVERSIONS
• Hexadecimal to Binary Conversion
|
|
Hexadecimal C 3
Binary 1100 0011
• Binary to Hexadecimal Conversion
Binary 1110 1010
Hexadecimal E A
DECIMAL TO HEXADECIMAL CONVERSION
Divide by 16 Process |
Decimal # | 47 | ÷ | 16 | = | 2 | remainder 15 | |
2 | ÷ | 16 | = | 0 | remainder 2 | ||
2 F |
HEXADECIMAL TO DECIMAL CONVERSION
Convert hexadecimal number 2DB to a decimal number |
Place Value 256s 16s 1s
Hexadecimal
Decimal
D B
(256 x 2) (16 x 13) (1 x 11)
731 |
OCTAL NUMBERS
Uses 8 symbols -Base 8 System 0, 1, 2, 3, 4, 5, 6, 7 |
Decimal | Binary | Octal |
1 | 001 | 1 |
6 | 110 | 6 |
7 | 111 | 7 |
8 | 001 000 | 10 |
9 | 001 001 | 11 |
PRACTICAL SUGGESTION ON NUMBER SYSTEM CONVERSIONS
• Use a scientific calculator
• Most scientific calculators have DEC, BIN, OCT, and HEX modes and can either convert between codes or perform arithmetic in different number systems.
• Most scientific calculators also have other functions that are valuable in digital electronics such as AND, OR, NOT,
XOR, and XNOR logic functions.
Why digital?
DIGITAL vs. ANALOG
|
|
Digital Signals
Linking two single switches (as above) replaces double switch
Silicon chips use transistors instead of switches which are usually 9.5*10 -5 mm.
Input is a logic signal “A”
Output is a logic signal “F”
Дата добавления: 2022-06-11; просмотров: 58; Мы поможем в написании вашей работы! |
Мы поможем в написании ваших работ!