Professional Documents
Culture Documents
부탁사항 : 불법 공개 / 공유 / 수업목적외 사용 금지
Analog – Continuous
- Natural Phenomena
(Pressure, Temperature, Speed…)
- Difficulty in realizing, processing using electronics
Digital – Discrete
- Binary Digit Signal Processing as Bit unit
- Easy in realizing, processing using electronics
- High performance due to Integrated Circuit Technology
Binary
Binary
•Two values(0, 1)
•Each digit is called as a “bit”
Good
Good things
things in
in Binary
Binary Number
Number
•Number representation with only two values (0,1)
•Can be implemented with simple electronics devices
(ex: Voltage High(1), Low(0) ; Switch On (1) Off(0)…)
•Combinational Circuit :
•outputs depend on only present inputs, not on past inputs
•Sequential Circuit:
•outputs depend on both present inputs and past inputs
•have “memory” elements
Decimal:
Decimal: 953.7810 9 10 2 5 101 3 100 7 10 1 8 102
Binary:
Binary: 1011.112 1 23 0 2 2 1 21 1 20 1 2 1 1 2 2
1 1 3
8 0 2 1 11 11.7510
2 4 4
Radix(Base):
Radix(Base): N (a4 a3a2 a1a0 .a1a 2 a3 ) R
a4 R 4 a3 R 3 a2 R 2 a1 R1 a0 R 0
a1 R 1 a 2 R 2 a3 R 3
3
Octal-Decimal:
Octal-Decimal: 147.38 1 82 4 81 7 80 3 81 64 32 7
8
103.37510
Hexa-Decimal:
Hexa-Decimal: A2 F16 10 16 2 2 161 15 16 0 2560 32 15 260710
Conversion
Conversion of
of Decimal
Decimal to
to Base-R
Base-R
N (an an 1 a2 a1a0 ) R an R n an 1 R n 1 a2 R 2 a1 R1 a0
N
an R n 1 an 1 R n 2 a2 R1 a1 Q1 , remainder a0
R
Q1
an R n 2 an 1 R n 3 a3 R1 a2 Q2 , remainder a1
R
Q2
an R n 3 an 1 R n 4 a3 Q3 , remainder a2
R
Example:
Example: Decimal
Decimal to
to Binary
Binary Conversion
Conversion
2 53
2 26 rem. = 1 = a0
2 13 rem. = 0 = a1
2 3 rem. = 0 = a3
2 1 rem. = 1 = a4
0 rem. = 1 = a5
Example:
Example:
F .625 F1 .250 F2 .500
2 2 2 .62510 .1012
1.250 0.500 1.000
(a1 1) (a 2 0) (a3 1)
Example:
Example: Convert
Convert 0.7
0.7 to
to binary
binary
.7
2
(1).4
2
(0).8
2
(1).6
2
(1).2
2
(0).4 Process starts repeating here because .4 was previously
2 obtained
(0).8 0.710 0.1 0110 0110 0110 2
7 45 .75
7 6 rem.3 7
(5).25 45.7510 63.5151 7
0 rem.6
7
(1).75
7
(5).25
7
(1).75
Conversion
Conversion of
of Binary
Binary to
to Hexa
Hexa
1001101 .010111 2 0100
1101
0101
1100
4 D.5C16
4 D 5 C
Conversion
Conversion of
of Binary
Binary to
to Octal,
Octal, Hexa-decimal
Hexa-decimal
(101011010111 )2
= ( 5 3 2 7 )8, octal
(10111011)2
= ( 2 7 3 )8, octal
(1010111100100101)2
= ( A F 2 5 )16, Hexadecimal
(1101101000)2
= ( 3 6 8 )16, Hexadecimal
Addition
00 0
0 1 1
1 0 1
1 1 0
and carry 1 to the next column
Example:
Example: 1111 carries
1310 1101
1110 1011
11000 2410
Subtraction
00 0
0 1 1 and borrow 1 from the next column
1 0 1
1 1 0
Example:
Example:
1 (indicates 1111 borrows 111 borrows
a borrow
11101 10000 111001
From the
10011 3rd column) 11 1011
1010 1101 101110
205
18
205 18 [2 102 0 101 5 100 ] 187
[ 1 101 8 100 ]
note borrow from column 1
[2 102 (0 1) 101 (10 5) 100 ]
[ 1 101 8 100 ]
note borrow from column 2
[(2 1) 102 (10 0 1) 101 15 100 ]
[ 1) 101 8 100 ]
[1 102 8 101 7 100 ] 187
Multiplication 0 0 0 Multiply:
Multiply: 13
13 x11
x11(10)
(10)
1101
1011
0 1 0 1101
1 0 0 1101
1 1 1 0000
1101
1111 multiplicand 10001111 14310
1101 multiplier
1111 first partial product
0000 second partial product
(01111 ) sum of first two partial products
1111 third partial product
(1001011) sum after adding third partial product
1111 fourth partial product
11000011 final product (sum after adding fourth partial prodoct)
Division
1101
1011 10010001
1011
1110
1011
1101 The quotient is 1101 with a
remainder
1011
of 10.
10
Magnitude
MSB
(a) Unsigned number
bn – 1 bn – 2 b1 b0
Magnitude
Sign
0 denotes + MSB
1 denotes –
(b) Signed number
N * 2n N
1’s
1’s complement
complement of
of aa positive integer NN
positive integer N (2 n 1) N
Example:
Example: 2 n 1 111111
N 010101
N 101010
2 의 보수와 1 의 보수 관계 N * 2 n N ( 2 n 1 N ) 1 N 1
== 2’s complement: 1’s complement + ‘1’
N 2 n N * and N (2 n 1) N
3 0011
Case
Case 11
4 0100
7 0111 (correct answer)
Case
Case 22 5 0101
6 0110
1011 wrong answer because of overflow (+11 requires
5 bits including sign)
Case
Case 33 5 0101
6 1010
1111 (correct answer)
Case
Case 44 5 1011
6 0110
(1)0001 correct answer when the carry from the sign bit
is ignored (this is not an overflow)
인하대 전자과 디지털논리회로 ECE2245 22/29
1.4 Representation of Negative Numbers
Addition of 2’s complement Numbers
Case
Case 55 3 1101
4 1100
7 (1)1001 correct answer when the last carry is ignored
(this is not an overflow)
Case
Case 66 5 1011
6 1010
(1)0101 wrong answer because of overflow
(-11 requires 5 bits including sign)
Case 5 0101
Case 33
6 1001
1 1110 (correct answer)
Case
Case 44 5 1010
6 0110
(1) 0000
1 (end-around carry)
0001 (correct answer, no overflow)
Case
Case 55 3 1100
4 1011
(1) 0111
1 (end-around carry)
1000 (correct answer, no overflow)
Case
Case 66 5 1010
6 1001
(1) 0011
1 (end-around carry)
0100 (wrong answer because of overflow)
11111000 (8)
00010011 19
(1)00001011 11
8-4-2-1
Decimal 6-3-1-1 Excess-3 2-out-of-5 Gray
Code
Digit Code Code Code Code
(BCD)
0 0000 0000 0011 00011 0000
1 0001 0001 0100 00101 0001
2 0010 0011 0101 00110 0011
3 0011 0100 0110 01001 0010
4 0100 0101 0111 01010 0110
5 0101 0111 1000 01100 1110
6 0110 1000 1001 10001 1010
7 0111 1001 1010 10010 1011
8 1000 1011 1011 10100 1001
9 1001 1100 1100 11000 1000
인하대 전자과 디지털논리회로 ECE2245 27/29
1.5 Binary Codes
6-3-1-1
6-3-1-1 Code:
Code:
N w3a3 w2 a2 w1a1 w0 a0
N 6 1 3 0 1 1 1 1 8
ASCII
ASCII Code
Code
Table 1-3
ASCII code
(incomplete)