How hardware and software interact




















Well, the shutdown isn't actually physical, all circuits in the computer aren't totally off until you physically unplug the power. When the computer is off, it can still be turned on without physically pulling a switch, for example by a Wake on LAN signal from a network card in the computer. The leg kicking a ball is a good example. It's quite similar in a machine. The CPU is connected to all the other parts of the system, but unlike the nervous system which is a physical wiring, with all nerves being connected at once, the CPU's does not maintain a permanent connection to the rest of the system.

It connects to the desired part on demand - similar to making a telephone call - all telephones have connections, but only a few are connected at any one time. The cpu does work by running instructions - the software program. There are instruction codes that instruct the cpu to dial some part of the system. Each part has a number, and the cpu has an instruction to dial a number.

Once the cpu dials that number, it sends a message to that part - the message is simply data - from one bit up to any arbitrary size block. The hardware at that location then acts on the message encoded. In doing it like this, the cpu can control any piece of hardware using the same mechanism. The only thing that changes for each device is the number the cpu has to dial and the data the cpu sends to the device - details that are put into the software the cpu is running.

So, to turn the machine off, the cpu dials the number for the power management device, and sends it instructions to go into an appropriate power state. The hardware responds, and the PSU stops sending primary power to the motherboard. When you write softare, you don't have to know all these details yourself. They are usually pre-packaged as ready to use code, so your software just has to say "shutdown" and the ready-made codes for this usually in the BIOS are executed to perform the shutdown, as outlined above.

One key important feature here is an amplification, the electrical signals used within a computer are tiny and always flowing as triggered by the clock, and as directed and amplified by the logic gates, they can be at some point sent out to physical devices connected to the computer where they can trigger an actual physical activity. Transistors are the ingenious components used to implement logic gates and amplification of signals.

They are at the centre of the software-hardware interface. Logic gates low-level circuitry and the CPU higher abstraction of logic gates are the key answer to your question. They are basically the bridge between software and hardware. This is my super-simplified explanation. A CPU has a clock cycle which is usually triggered by naturally occurring vibrating elements like Quartz crystals.

During every cycle, it fetches an instruction from memory the software side and its ALU Arithmetic Logic Unit runs some circuitry and based on the software instructions, and outputs some data which can potentially be written back to another memory location. Now on the hardware side, every piece of hardware has firmware on it, the firmware is a bunch of logical instructions usually wired with pure circuity logic gates, again , based on the input it can output a specific combination of electrical signals which can be amplified and used to trigger an actual physical event e.

Some connect to CPU. Examples of these are Ports and hardware interrupts IRQ. These allow sending small amounts of data by host program request and calling functions interrupt handlers based on hardware triggers discrete line going from low to high.

There're faster interfaces for transferring massive amounts of data that bypass CPU. This is called DMA direct memory access. These are used to transfer data to disk, network, display adapters, etc. For IRQ, the hardware speaks up first to trigger software response. Only device drivers are allowed to do all these. If you try doing it from the application, OS will smash it at instant. Applications connect to this world thru APIs presented by device drivers.

When you push the button, you are actually sending a 5 volt signal to the power supply unit. This 5 volts of power never actually switches off even when you think your computer is off. You need this 5 volts for when you push the button to turn the computer on - at which point another 5 volts is sent in to the power supply unit to tell it to switch back on.

This is how voltage levels control the LED bulb. This works fine until this mechanism actually is able to operate as per your requirement. In case of computers, the entire hardware is supplied varying voltages due to which different components get activated at the same or different time instances and achieve a particular task.

Finally all the binary data in a computer is nothing but the voltage level information, for which a particular task is assigned to be executed. The entire sequence of events that occur for hardware and software interaction is under the control of OS. All the driver software help the OS to actually communicate with the hardware, so as to execute the application software.

All Rights Reserved. Forgot Password? This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy. Hardware vs Software By Priya Pedamkar. Popular Course in this category. Course Price View Course. Free Software Development Course. Login details for this Free course will be emailed to you.

Email ID. Contact No. The software is a collection of instructions that let the user interact with the hardware and command it to do a particular task. Basically bringing the hardware and the software together to give you all the games that you love on your Xbox.

This is the hardware. But what you don't see is the software. Software is all of the computer programs, or code, running on this machine. Software can be anything from apps and games to webpages and data science software that me and my teams use at Amazon to understand how customers behave.

But how do the hardware and the software interact with one another? Lets start at looking at a computer's central processing unit, or CPU. A CPU needs to do different things, so inside it has smaller, simpler parts that handle specific tasks. It has circuits to do simple math and logic, it has other circuits to send and receive information to and from different parts of the computer.

The real magic of the CPU is how it knows which circuits to use and when to use them.



0コメント

  • 1000 / 1000