How Hardware and Software communicates?

813 views

I still wonder how people manage to create a machine that visualize a graphic to a screen then commands it with a button.
I still wonder how “programming” works through metal/gold/copper
I’m still amaze that people made these stuff

In: Technology

8 Answers

Anonymous 0 Comments

Hi 🙂

That’s a very complex subject and a lot of great posts already 🙂

I’m not summarizing how you get from a key-press to a display message here; But if you’re interested in understanding such things at a fundamental level, with hands-on experience and not just reading about it… It’s fun to try stuff:

– Go through an electronics guide such as “Getting started in electronics”, it has a lot of cartoony drawings on how electrons move, what resistance, capacitors, transistors do. At their very core, computers are nothing else. Some experiments can be done with a battery and wire.

– Transistors are key. They can switch stuff on and off when applying a smaller current. Like an electronic switch. If you combine multiple of these, you can do logic operations and simple calculations. E.g. both switches have to be on for an LED to light up. Basically just stuff like 0+1 = 1 or 1-1 = 0. You can build that with a bunch of transistors and lights for cents. That doesn’t look very useful, it is the most basic, but if you imagine chaining up hundreds, thousands, millions of transistors, computers can work with complex numbers.

– Computer processors just do this all day. They add, subtract zeros from binary storage. 0010 could stand for the number 4 in some program, it could be a color on your display, anything. And every component of your computer has some memory and processing. E.g. a display has a display driver, cache. And these components know what to do with a certain string of zeros and ones.

– Try Scratch. It’s a programming suite for kids that uses blocks instead of written programming language. You can chain stuff together (e.g. “IF button is pressed” – “move cat.jpg to the right” – “ELSE play meow.mp3”). It’s abstract but understanding programming (IF ELSE actions) will de-mystify a lot of things.

– Try microcontrollers/microcomputers. The very basic computer with memory, inputs, outputs. E.g. Pick up an $10-20 “Arduino” kit or robot. You plug in a small board via USB, and you can tell it to switch things on and off, read inputs (buttons, thermometers, distance sensors). E.g. if the thermometer measures a rising temperature, it displays how hot it is with a chain of 5 LED, or triggers an alarm. This is forms a very basic input-output device. And it is possible to even hook up keyboards, displays.

– Arduino uses a C/C# programming environment, but there are visual programming languages like or based on Scratch (Scratch4Arduino, Blockly…).

– The nice thing is that there are so many examples you can basically just use one of them and try to change a few numbers to see what it does. E.g. reverse the direction of a motor, or the distance a sensor causes a robot to stop.

– With students I made a robot car. Arduino, battery, two motor boards, and a distance sensor. The program was 6 lines of code: “IF distance<20cm -> stop the right wheel for a second”. That’s enough for a car to crudely avoid tables, legs.

Have fun 🙂

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