How do a computer’s hardware and software actually connect?

835 viewsOtherTechnology

How do a computer’s hardware and software actually connect?

In: Technology

16 Answers

Anonymous 0 Comments

Computer chips are made of circuits called logic gates. Some of these gates hold a position of on or off. Others do things like directing a signal to one place or another. There are sets of the circuits that hold the value called a register. Many registers are lined up similar to a list of instructions. There are 2 things in a register. A set of bits that determines what set of circuits are activated and a set of bits that is connected to those circuits. There’s a special set of bits called a program counter. That determines what register is activated and therefore what additional circuits are activated and what bits are fed into those circuits. The program counter starts at the first register (step one) and goes through them sequentially unless told otherwise. Like if step 8 says go to step 4 if bit 4 is 0. There are lots of sets of circuits that can be activated. Like add these 2 numbers. Move these bits one place to the left. Write this number to this register. Etc. when we write software, we’re just setting the bits in the registers. Programming languages are just ways to set bits. The “lowest level” language is assembly. This if a set of words that directly translates to what bits get set. “LSL” is logical shift left. Meaning activate the circuit that moves bits one spot to the left. C is the language the next level up. In C you can write things like “int A = X + Y;” this translates to “dedicate a register to hold A. Get the values from the registers that contain X and Y. Add them together and store the result in A. Disclaimer that this is not how modern computers do things and even when it was this isn’t 100% accurate. It’s just a lot of details to go into.

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