What makes computer code ‘work’

831 viewsEngineeringOther

By this I mean, when you write code, what exactly gives that the power to do anything is it more code? 0’s and 1’s? more so, what gives that thing the power to do anything? At some stage I can only deduce what must just be magic making it work because it’ll boil down to something metal and plastic ‘talking to’ an electric current, which doesn’t make sense at all

In: Engineering

17 Answers

Anonymous 0 Comments

Transistors, particularly transistors as switches. A transistor lets electrical current through if it gets a control current. This lets you do binary logic. There’s four binary operators; AND, OR, XOR and NOT.

AND returns true if both input bits are 1. OR returns true if either or both bits are 1. XOR returns true if one input is 1 and one is 0. NOT turns the input to the opposite value, e.g. 1 becomes 0 and 0 becomes 1.

You can create these operators with transistors (and well, with possibly e.g. diodes, but that’s not as optimal). Then you group these sort of operators into blocks, and those blocks into bigger blocks, and eventually, you can do stuff like basic mathematics.

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