ʻO nā puka logic: nā mea āpau e pono ai ʻoe e ʻike

ʻīpuka noʻonoʻo

ka ʻO nā puka logic ke kumu o ka uila uila. No kēia kumu, he mea koʻikoʻi lākou, a inā makemake ʻoe e hoʻomaka e hana pū me lākou, pono ʻoe e ʻike i ke ʻano o lākou, pehea lākou i hoʻokumu ʻia ai, a me kā lākou hana. No laila hiki iā ʻoe ke hoʻohana i ke ʻano o nā chips e noho nei ma ka mākeke i loaʻa kēia ʻano o nā puka i hiki iā ʻoe ke hoʻomaka e hana i kāu mau papahana ponoʻī e hana me kēia loiloi.

ʻO kēia mau puka, hui pū me nā mea ʻē aʻe Nā mea uila, a me na papa like ʻO Arduino, hiki iā lākou ke hāʻawi nui i ka pāʻani i nā mea hana e like me kāu e ʻike ai iā ʻoe iho.

He aha nā ʻīpuka loina?

kikohoʻe logic circuit

ka ʻīpuka noʻonoʻo he mau mea ko'iko'i ia o ka loina kikoho'e no ka ho'okō 'ana i nā kaapuni uila uila. Hāʻawi kēia mau ʻīpuka i nā hōʻailona uila haʻahaʻa (0) a i ʻole kiʻekiʻe (1) ma kā lākou hoʻopuka ma muli o ke kūlana o kā lākou hoʻokomo. Hoʻokahi puka a me ʻelua puka komo, akā aia paha nā puka me nā puka ʻoi aku ma mua o 2. Eia kekahi, aia nā mea ʻokoʻa e like me ka puka hoʻohuli a i ʻole NOT, hoʻokahi wale nō hoʻokomo a hoʻokahi puka.

Mahalo i kēia mau hoʻokomo a me nā hoʻopuka Boolean hiki iā ʻoe ke loaʻa nā hana loiloi binary kumu, e like me ka hoʻohui, multiplication, negation, etc.

Pehea e hoʻokōʻia ai?

ʻAʻole hiki ke hoʻokō wale ʻia nā puka logic i hoʻokahi ala. ʻOiaʻiʻo, ʻo ia ke kumu he ʻokoʻa ʻohana logical. E hoʻokō kēlā me kēia ʻohana i ka ʻīpuka ma ke ala hoʻokahi, me ka hoʻohana ʻana i nā mea uila like ʻole.

Por hanaInā hoʻohana ʻia ʻo TTL no ka chip, e hana ʻia nā puka i nā transistors bipolar, aʻo ka loiloi CMOS e hoʻokumu wale ʻia ma nā transistors MOSFET. Ma waho aʻe o kēia mau ʻohana ʻelua, ʻo ia ka mea maʻamau ka mea kaulana loa, aia kekahi mau mea ʻē aʻe e like me BiCMOS (hoʻohui i nā transistors bipolar a me CMOS), RTL (resistors a me nā transistors bipolar), DTL (diodes a me transistors), ECL, IIL, etc.

ʻAʻohe ʻohana i ʻoi aku ka maikaʻi ma mua o kekahi, e hilinaʻi ia i ka noi. Akā naʻe, CMOS ʻO ia kekahi o nā mea i hoʻohana nui ʻia i nā kaapuni holomua, e like me CPU, MCU, GPU, hoʻomanaʻo, etc. No nā kaapuni maʻalahi ʻē aʻe he mea maʻamau ka loaʻa ʻana o ka TTL.

noi

mea hoʻohui maʻalahi

ʻAʻole pau ka hoʻohana ʻana o kēia mau puka logic. Me kēia mau "bricks" koʻikoʻi hiki iā ʻoe ke kūkulu ka nui o nā kaapuni kikohoʻe. Mai kahi mea hoʻohui maʻalahi, i kahi CPU paʻakikī, ma o nā kaapuni ʻē aʻe he nui āu e noʻonoʻo ai. ʻO ka ʻoiaʻiʻo, ʻo ka nui o nā ʻōnaehana āu e hoʻohana ai i kēlā me kēia lā, e like me kāu PC, kāu TV, kelepona, a me nā mea ʻē aʻe, loaʻa nā ʻīpuka logic.

No ka hana ʻana i kēia mau kaʻapuni, pono e loaʻa ka ʻike o ka logic digital, Boolean algebra, kahi ʻike maikaʻi o ka ʻōnaehana binary, simplify functions, etc. E hāʻawi kēia mau mea no nā ʻatikala hou aʻe, akā he mea hoihoi ia ...

Un laʻana kūpono ʻO ka hoʻohana ʻana i nā ʻīpuka logic ka mea hoʻohui maʻalahi āu e ʻike ai ma ke kiʻi ma luna. He kaapuni maʻalahi loa ia, hiki iā ia ke hoʻohui i ʻelua mau ʻāpana (A a me B) i kāna mau mea hoʻokomo e hāʻawi i ka hopena Sum, a me ka Carry, ʻo ia hoʻi, ka mea āu e lawe aku ai ... Hiki iā ʻoe ke ʻike i nā hopena e hiki mai ana. e hāʻawi ma ka papa ʻaina.

A B Mokau E lawe aku Ka hopena binary
0 0 0 0 00
0 1 1 0 01
1 0 1 0 01
1 1 0 1 10

Inā ʻoe e nānā i kēia pākaukau, inā ʻoe e hoʻohui i ka 0 + 0 i ka binary e hāʻawi iā ʻoe i ka 0, inā ʻoe e hoʻohui i ka 1 + 0 ʻo ia ka 1, akā inā ʻoe e hoʻohui i ka 1 + 1 e hāʻawi ia i ka 2, ʻo ia ka mea ma ka ʻōnaehana binary e like me 10.

Nā ʻano o nā ʻīpuka logic

SYMBOLS logic ipuka

No ka ʻano o nā ʻīpuka loiloi, loaʻa iā ʻoe ka helu maikaʻi o lākou, ʻoiai ʻo ka mea i hoʻohana nui ʻia e like me kēia (me kā lākou mau papa ʻoiaʻiʻo):

E like me kāu e ʻike ai ma ke kiʻi ma luna, aia kekahi mau nomenclatures e hōʻike i nā puka logic i nā kaapuni. ʻO ka mea laha loa ʻo ANSI (lālani ʻelua), ʻoiai he mea maikaʻi ke ʻike i nā mea like e hiki ai ke unuhi i nā kaapuni ʻē aʻe me nā ʻano ʻē aʻe (DIN a i ʻole Kelemānia, BS a i ʻole Pelekane, IEC, NEMA, ...).
  • Hoʻopaʻa (ʻAe): ʻike ʻia ʻo ia ʻo buffer a i ʻole puka pololei, no ka mea, e like ka mokuʻāina o kāna puka me kāna hoʻokomo. ʻOiai he mea ʻole paha ia, ma nā kaʻapuni logic he nui ia e hoʻohana pinepine ʻia ma ke ʻano he amplifier o kēia manawa a i ʻole he mea hahai voli.
Entrada Hōʻalo
0 0
1 1
  • ʻAʻole (mea hoʻohuli): ʻo ia ka negation logical (¬ o '), ʻo ia hoʻi, hoʻohuli i ka bit ma kāna puka.
Entrada Hōʻalo
0 1
1 0
  • A (Y): hana kēia ʻīpuka ʻē aʻe i kahi hana huahana (·) o nā ʻāpana binary o kāna hoʻokomo. 'O ia ho'i, ua like ia me ka hoonui 'ana i ka A a me ka B. No laila, 'o ka mea me ka 'ole, 'o ia ka 'ole, e hā'awi wale ana ia i ho'okahi i kona puka 'ana inā he 1 nā mea ho'okomo 'elua. No laila kona inoa 1 ME 1.
A B S
0 0 0
0 1 0
1 0 0
1 1 1
  • gula): hana kēia ʻīpuka ʻē aʻe i ka hana hoʻohui kūpono (+). ʻO ia hoʻi, ʻo kekahi o kāna mau hoʻopuka a i ʻole nā ​​mea ʻē aʻe, a i ʻole pono nā mea ʻelua ma 1 no kāna puka ʻana he 1. Ke 0 nā mea ʻelua, ʻo ka 0 pū kekahi.
A B S
0 0 0
0 1 1
1 0 1
1 1 1
  • XOR (a kūʻokoʻa paha): Hoʻohana kēia OR i ka hana Boolean A'B + AB ', a ʻo kāna hōʻailona . I kēia hihia, inā like kāna mau mea hoʻokomo ʻelua, ʻo ka pukana he 0. Inā ʻokoʻa lākou, a laila ʻo ia ka 1.
A B S
0 0 0
0 1 1
1 0 1
1 1 0
  • NAND (Hoʻole ʻia Y): ʻo ia ka hua hoʻopono hoʻoneʻe ʻia, ʻo ia hoʻi, ka hoʻohuli ʻana o ka AND. Ua like ia me ka hoʻohana ʻana i kahi NOT ma ka puka AND e hoʻohuli i nā bits. No laila, ʻo nā hopena:
A B S
0 0 1
0 1 1
1 0 1
1 1 0
  • NOR (A i ʻole i hōʻole ʻia): ka huina kupono i hooleia, a he aha ka mea like, he OR me kona puka i hooleia, e hopena i ka hoohuli o ka OR.
A B S
0 0 1
0 1 0
1 0 0
1 1 0
  • XNOR (NO kūʻokoʻa): ua like ia me ka hoʻopili ʻana i ka hoʻohui binary i kahi puka XOR. ʻO ia hoʻi, e hana i ka hana AB + A'B. Hoʻohui ʻia ka manawa B i ka manawa i hōʻole ʻia ʻo B. No laila, e like nā mea hoʻopuka me nā XOR i hoʻohuli ʻia:
A B S
0 0 1
0 1 0
1 0 0
1 1 1

ʻO NOR a me NAND ʻelua o nā ʻīpuka hoihoi loa, ʻoiai ua ʻike ʻia lākou he ʻīpuka loina honua. ʻO ia, hiki iā ʻoe ke hana kaʻapuni me lākou wale nō e hōʻike i nā ʻano ʻano ʻē aʻe o ka puka logic. He mea nui kēia, no ka mea, inā kūʻai ʻoe i nā chips me kēia mau puka, hiki iā ʻoe ke loaʻa nā hana āpau. No ka laʻana, inā hoʻopaʻa ʻia nā mea hoʻokomo ʻelua o kahi NOR a i ʻole like ka NAND me kahi NOT. Loaʻa iā ʻoe nā mea like ma aneʻi:

puka like

Nā hana: electronics-tutorials.ws

Te ʻLelo aʻoaʻo wauNo ke aʻo hou aku, Google he kaapuni maʻalahi me nā ʻīpuka. A no ka ʻike ʻana i kāna hana, e hana i kahi ʻano "reverse engineering", e hahai i nā laina o nā hoʻokomo a me nā mea hoʻopuka a ʻike i ke kūlana o kēlā me kēia laina e like me nā mea hoʻokomo i hāʻawi ʻia i ka hoʻopuka.

Por hanaInā ʻoe e nānā i ke kiʻi ma luna, ʻo ke kiʻikuhi like o kahi OR me nā puka NAND, e ʻike ʻoe aia ʻelua mau puka NAND me kā lākou hoʻokuʻu ʻana a hele nā ​​​​mea ʻelua i kekahi NAND. E hoʻomanaʻo i kēia mau mea:

  • Inā hele ʻoe i ka papa ʻoiaʻiʻo NAND, e ʻike ʻoe i ka wā o kāna mau mea hoʻokomo ʻelua he 0 ka mea hoʻopuka he 1, a inā ʻo kāna mau hoʻokomo ʻelua ʻo 1 ka mea hoʻopuka he 0.
  • I ka wā i hoʻopaʻa ʻia ai lākou, inā he 1 ka mea hoʻokomo (komo kekahi i nā mea ʻelua), ʻo ka hopena he 0. A inā he 0 ka mea hoʻokomo (ʻaʻohe ʻelua), ʻo 1 ka mea hoʻopuka, ua like ia me ka NOT.
  • No laila, loaʻa iā mākou ʻelua NOTs no nā bits A a me B. No laila, loaʻa iā mākou ka A 'a me B' i kā lākou hoʻopuka.
  • E hele ana kēlā mau negations ʻelua i ka NAND hope loa, e hana i kahi huahana loiloi inverse o kēlā mau ʻāpana ʻelua.
  • E like me nā kānāwai o ka loiloi, ua like kēia me ka huina pololei, ʻo ia hoʻi, A + B. No laila, ʻo ka hopena hope loa e like me he OR ...

Logic Gate Chip Series - Kahi e kūʻai ai

Ma nā hale kūʻai kūikawā i ka uila hiki iā ʻoe kūʻai i nā ʻāpana makamae me nā puka logic e hoʻomaka ai e hoʻohana i kāu mau papahana. ʻAʻole kēia mau ʻāpana he puka logic hoʻokahi, akā ʻae lākou iā ʻoe e loaʻa i kekahi o lākou i hiki iā ʻoe ke hoʻopili i kā lākou mau hoʻokomo a me nā mea hoʻopuka e like me kou makemake. No ka laʻana, ma ke kiʻi ma ke kiʻi ma luna nei hiki iā ʻoe ke ʻike i kahi pinout maʻamau o kahi chip DIP me nā puka 4 NAND. Eia kekahi, ʻelua mau pine no ka mana (Vcc a me GND).

Eia. Eia kūʻai ʻōlelo aʻoaʻo:

Nā pono waiwai ʻē aʻe

I mea e aʻo hou ai e pili ana i ka hoʻokō ʻana i kēia mau ʻīpuka a pehea e hoʻomaka ai e hana i nā kaapuni me lākou, hiki iā ʻoe ke hoʻohana i kēia Nā kumuwaiwai ʻē aʻe he aha kaʻu e paipai ai:

Loko kikohoʻe me Arduino

Arduino UNO millis hana

Nā kumuwaiwai ʻē aʻe He aha kāu i loko o kou mau lima inā loaʻa iā ʻoe he pā Arduino UNO aia ma kou lima E hoʻohana i ka Arduino IDE e hana i nā kiʻi e hoʻohālike i kēia mau hana logic e, no ka laʻana, e ʻike i ka hopena ma kahi ala ʻoi aku ka ʻike me kahi LED e hoʻohālikelike i ka puka o ka puka. No ka laʻana, ke kau ʻana i kahi LED ma ka pine 7 a me ka hoʻohana ʻana i ka 8 a me 9 i mea hoʻokomo A a me B:

int pinOut = 7;
int pinA = 8;
int pinB = 9;

void setup()
{
pinMode(pinOut, OUTPUT);
pinMode(pinA, INPUT);
pinMode(pinB, INPUT);
}
void loop()
{
boolean pinAState = digitalRead(pinA);
boolean pinBState = digitalRead(pinB);
boolean pinOutState;
//AND
pinOutState =pinAState & pinBState;
digitalWrite(pinOut, pinOutState);
}

Ua hoʻohana ʻia kahi hana AND (&) ma aneʻi, e like me kāu e ʻike ai, akā hiki iā ʻoe ke hoʻololi i kēlā laina code ma lalo o ka // AND laina me nā mea ʻē aʻe e hoʻohana ai. nā hana loiloi ʻē aʻe:

//OR
pinOutState = pinAState | pinBState;

//NOT
pinOutState = !pinAState;

//XOR
pinOutState = pinAState ^ pinBState;

//NAND
pinOutState = !(pinAState & pinBState);

//NOR
pinOutState = !(pinAState | pinBState);

//XNOR
pinOutState = !(pinAState ^ pinBState);

 


Hoʻopili ka ʻike o ka ʻatikala i kā mākou kumumanaʻo o ka hoʻoponopono hoʻoponopono. E hōʻike i kahi kaomi hemahema ʻaneʻi.

E lilo i mea mua e wehewehe

E waiho i kāu manaʻo

Kāu leka uila aae? E,ʻaʻole e paʻiʻia.

*

*

  1. He kuleana no ka ʻikepili: Miguel Ángel Gatón
  2. Ke kumu o ka ʻikepili: kaohi SPAM, hoʻokele ʻōlelo.
  3. Legitimation: Kou ʻae
  4. Ka kamaʻilio ʻana o ka ʻikepili: ʻaʻole e hōʻike ʻia ka ʻikepili i nā ʻaoʻao ʻekolu koe ka mana o ke kānāwai.
  5. Pūnaewele mālama: Pūnaewele i mālama ʻia e Occentus Networks (EU)
  6. Nā Kuleana: I kēlā me kēia manawa hiki iā ʻoe ke palena, hoʻōla a kāpae i kāu ʻike.

Hoʻāʻo PelekaniaE ho'āʻo iā Catalankuʻikahi Paniolo