N88-BASICでデジタル回路 (3回目)
2024/2/6(火) N88-BASICでデジタル回路 (3回目) OFFスイッチ/ONスイッチでON/OFF制御する デジタル回路 ■ 解説 1=true(真)、0=false(偽) a:OFFスイッチ b:ONスイッチ c:出力 以下 NOT, AND, ORは1bit論理演算子とする c = 0 x = NOT a z = c AND x c = z OR b 初め c = 0, a = 0, b = 0 x = NOT a = NOT 0 = 1 z = c AND x = 0 AND 1 = 0 c = z OR b = 0 OR 0 = 0 出力c = 0 bを押す c = 0, a = 0, b = 1 x = NOT a = NOT 0 = 1 z = c AND x = 0 AND 1 = 0 c = z OR b = 0 OR 1 = 1 出力c = 1 bを離す c = 1, a = 0, b = 0 x = NOT a = NOT 0 = 1 z = c AND x = 1 AND 1 = 1 c = z OR b = 1 OR 0 = 1 出力c = 1 aを押す c = 1, a = 1, b = 0 x = NOT a = NOT 1 = 0 z = c AND x = 1 AND 0 = 0 c = z OR b = 0 OR 0 = 0 出力c = 0 aを離す c = 0, a = 0, b = 0 x = NOT a = NOT 0 = 1 z = c AND x = 0 AND 1 = 0 c = z OR b = 0 OR 0 = 0 出力c = 0 以上により b=1でc=1の後b=0でもc=1 ...