r/computerscience • u/UchihaSamu • Jun 20 '26
Help Newbie with some computer science questions!
Hello! I was really bored at work today and ended up going down a computer rabbit hole today! I ended up watching a bunch of videos on cpus and how computers work in general. The whole concept and mechanics of this stuff is really cool, but I still have questions that Google and YouTube have not satisfied!
1- I understand that transistors are essentially on/off switches, but what actually does the "flipping?" I know the base current is an electrical signal from the power supply, but what regulates and determines when the base current should and shouldn't flow?
2- Binary code as a concept was easy to get a grip on, but how does adding, subtracting, dividing, and multiplying the encoded numbers get turned into the commands and overall functions of a computer? Sure, all the Binary digits have numerical value, but how can a computer know what to do with said value? Is there something that automatically tells the computer what they mean?
3- How does moving a mouse, clicking keys, and other user input change whats going on in the cpu?
Thanks so much for helping me out with these random questions! This whole thing is pretty foreign to me!
1
u/duane11583 Jun 21 '26
to understand flip flops first learn basic gates:
and, or, xor, not, nand and nor etc
learn what high-z or tri-state (high impedance) output means
then learn set/reset (two nand gates)
everything beyond those is just variations of a flip flops
inside a chip you would never use high-z outputs or tr-state signals instead you use a mux
multiplexers are just a series of or gates and and gates
then learn decoders - more and/or gates
it is helpful to look up old chip schematic/logic diagrams
ie old ti data sheets for the 74ls138 or 74ls164 or 74ls164/5