User blog:Tinion/Hardware Vs Software

Hardware Programming vs SOftware programming. Just like the topic suggests, you might be wondering if anyone can program hardware as much as software. The answer is Yes. You can do every bit of thing what you do in software with hardware. Here are the following questions that arise when speaking about this topic.

If hardware can do everything why do we need software at all? What is hardware  programming? How does it differ with hardware programming? And lot more question... Here goes the answer...

Hardware or software, it does not matter, you are fundamentally dealing with logics. Its logics which you are trying to apply over hardware and evetually to software. Take for example a raw comparison of hardware and software applied for a car alarm for door, key and seat belt.

in software let say you write a program in C language it might look like this if( (!( seatbelt_status) && key_status ) || door_status) == TRUE)    buzzer_set_status(ON); else     buzzer_set_status(OFF);

The same idea can be equally implemented in hardware as well using this simple logic circuit.



What is the difference?

In hardware all the events such as key, door and seatbelt status will be handled in real time in comparison with software where the code will be run in a microcontroller 'line by line', which is broken into 'intruction by instruction'.

Likewise a 'for' loop can be compared equivalent to a counter circuit in digital logic.

Inspite of all these, why software is preffered to hardware, the reason is the ability to make changes frequently without any change in physical hardware. Imagine a car manufacturer updating his hardware circuit for a million cards compared to providing a software update!!!