How do you define “if” for computers?

428 views

I’m not a programmer, how do you get from binary 1s and 0s to “if x occurs complete y” How do you tell the computer to wait for a future input?

In: 2

11 Answers

Anonymous 0 Comments

Input bits A and B.

Very simply, send both through an AND gate, and it will produce a 1 only if both A and B are 1. You can then send the 1 through the circuitry to accomplish what you want in the case “A AND B” is true.

You are viewing 1 out of 11 answers, click here to view all answers.