M. Amer Iqbal Qureshi



tải về 3.06 Mb.
Chế độ xem pdf
trang15/132
Chuyển đổi dữ liệu09.12.2022
Kích3.06 Mb.
#53945
1   ...   11   12   13   14   15   16   17   18   ...   132
Amer Iqbal - Teach Yourself PIC Microcontrollers for Absolute Beginners-Microtronics Pakistan (2001)

OR gate 
Similar to the previous case, OR gate also has 
two or more inputs and one output. The gate 
with only two inputs will be considered in this 
case as well. A logic one (1) will appear on its 
output in case either one or another output (A 
OR B) is driven to logic one (1). In case the OR 
gate has more than two inputs, the following 
applies: a logic one (1) appears on its output in 
case at least one input is driven to logic one (1). 
In case all inputs are driven to logic zero (0), 
the output will be driven to logic zero (0). 
Not gate 
This logic gate has only one input and only one output. 
It operates in an extremely simple way. When logic zero 
(0) appears on its input, a logic one (1) appears on its 
output and vice versa. This means that this gate inverts 
signal by itself and because of that it is sometimes called 
Fig. 10 Use of Logical AND in Software 
Fig. 11 The OR Gate with Truth Table 
Fig. 12 The OR being Used in Software 
Fig. 13 The NOT Gate 


Teach Yourself PIC Microcontrollers | www.electronicspk.com | 16 
inverter. 
In a program, logic NOT operation is performed on one byte bits. The result is 
a byte with inverted bits. If byte bits are considered to be a number, inverted 
value is actually a complement of that number, i.e. The complement of a 
number is what is needed to add to it to make it reach the maximal 8 bit value 
(255). 
EXCLUSIVE OR gate 
This gate is a bit complicated comparing to other gates. It represents combination of all previously 
described gates. It is not simple to define mutual dependence of input and output, but we will anyway try to 
do it. A logic one (1) appears on its output only in case the inputs have different logic states. 
In a program, this operation is commonly used to compare two bytes. Subtraction may be used for the same 
purpose (if the result is 0, bytes are equal). The advantage of this logic operation is that there is no danger 


Teach Yourself PIC Microcontrollers | www.electronicspk.com | 17 
to subtract larger number from smaller one. 
Register 
A register or a memory cell is an electronic circuit which can memorize the state of one byte. In other 
words, what is a byte theoretically, it is a register practically. 

tải về 3.06 Mb.

Chia sẻ với bạn bè của bạn:
1   ...   11   12   13   14   15   16   17   18   ...   132




Cơ sở dữ liệu được bảo vệ bởi bản quyền ©hocday.com 2024
được sử dụng cho việc quản lý

    Quê hương