3-amaliy ish. Quyidagi ifodaga mos mantiqiy sxemani chizing va


Download 28.82 Kb.
Sana25.05.2020
Hajmi28.82 Kb.
#109701
Bog'liq
KTE amalyot




3-amaliy ish. Quyidagi ifodaga mos mantiqiy sxemani chizing va
mantiqiy ifodaning qiymatini toping.
F = (A̅&B̅) ∨ (B̅&C̅), аgаr A=1, B=1, C=0
Avvalambor mantiqiy ifodani soddalashtirib olsak (agar iloji bo’lsa) maqsadga
muvofiq bo’ladi.

Endi esa uning mantiqiy sxemasi va rostlik jadvalini tuzamiz:






a

b

с

⌐b

⌐a

⌐c

(⌐a) v (⌐c)

(⌐b) & ((⌐a) v (⌐c))

0

0

0

1

1

1

1

1

0

0

1

1

1

0

1

1

0

1

0

0

1

1

1

0

0

1

1

0

1

0

1

0

1

0

0

1

0

1

1

1

1

0

1

1

0

0

0

0

1

1

0

0

0

1

1

0

1

1

1

0

0

0

0

0



4-amaliy ish. Quyida keltirilgan ifoda uchun assembler tilida dastur
tuzing:

10bc+2ac;



MOV

ECX, c

ECX = c

MOV

EAX, a

EAX = a

IMUL
IMUL

EAX, c
EAX, 2

EAX = EAX * c = ac
EAX = EAX * 2 = 2ac

MOV

EBX, b

EBX = b

IMUL

EBX, c

EBX = EBX * c = bc

IMUL

EBX, 10

EBX = EBX * 10 = 10bc

ADD

EAX, EBX

EAX = EAX + EBX = 2ac + 10bc

MOV

result, EAX

result = EAX =10bc+2ac

JMP

DONE

DONE ga o’tish

Download 28.82 Kb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling