Tải bản đầy đủ (.pdf) (172 trang)

Ky thuat so

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (11.15 MB, 172 trang )

Digital system design



Digital Systems
Digital vs. Analog Waveforms

+5

+5
1

0

1

V

V
Time
–5
Digital:
only assumes discrete values

Time

–5
Analog:
values vary over a broad range
continuously



Digital signal status

Wave form


Decimal base 10

Binary base 2


Hexadecimal base 16



From decimal to binary

Surplus

Surplus
Surplus
Surplus


Decimal to hexadecimal

Surplus
Surplus
Surplus



Binary to Hexadecimal

Hexadecimal to Binary


Binary characteristics

Transform



2. Mathemmatic of binary:

a. Add :
0
0
1
1

+
+
+
+

0
1
0
1


=
=
=
=

1

0
1
1
0 nhớ 1

1

1

1 0 1 1 1
1 0 1
1 1 1 0 0

b. Subtract:

0
0
1
1

-

0

1
0
1

=
=
=
=

-1 -1 -1

0
1 mượn 1
1
0

1 1 0 1 0
1 1 1
1 0 0 1 1
13


1 0 1 1
1 0 0 1

c. Multiply:

1 0 1 1
0 0 0 0
0 0 0 0

1 0 1 1
1 1 0 0 0 1 1

d. Divide:
1 0 0 1
1 0 1
1 1
1 0

0 0 0 1
1
1 0
1 1
1 1 0 1
1 0 1 1
1 0
14

1 0 1 1
1 1 0 1


2. Signed Binary Arithmetic:

- Like signed decimal Arithmetic .
- The calculation and result must have similar number of
bits
- If result are not in the bit range, should increase the
number of bits of the calculation)


-6
+
+3
-3
+4 :
+
+5 :
-7 :

: 1010
: 0011
: 1101
0100
0101
1 0 0 1 (Wrong)

-2 : 1110
+
-5 : 1011
-7 : 1001
00100
00101
0 1 0 0 1 : + 9 (Correct)


-6
-2
-4

:

:
:

+2

:
-5 :
+7 :

1010
1110
1100

-7 : 1001
+5 : 0101
+ 4 : 0 1 0 0 (Kq sai)

0010
1011
0111

11001
00101
1 0 1 0 0 : - 12 (Kq đúng)

16






d. Mã ký tự ASCII:

20


Seven Segment Displays
This presentation will demonstrate how






A seven-segment display can be used to display the decimal
numbers 0-9 and some alpha characters.
A common anode seven-segment display works.
A common cathode seven-segment display works.
To select the resistor value for a seven-segment display.

Retro
LED Watch
(Circa 1970s)

21


a
g


f

b
c

e
d
a

g

f

b
c

e
d



Truth Tables for logic operators
Truth table: tabular form that uniguely represents the relationship
between the input variables of a function and its output
2-Input AND

A
0
0
1

1

B F=A•B
0 0
1
0
0 0
1
1

2-Input OR

A
0
0
1
1

B F=A+B
0 0
1
1
0 1
1
1

NOT

A F=A’
0

1
1
0


Truth Tables (cont.)




Q: Let a function F() depend on n variables.
How many rows are there in the truth table of
F() ?
n

n

A: 2 rows, since there are 2 possible binary
patterns/combinations for the n variables


Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×