
Ask HN: Best book for understanding hardware-software interface - timkofu
What&#x27;s a good book for understanding where and how hardware and software connect?
======
deepaksurti
One of the best ways would be to build a computer yourself. For that I haven’t
found anything better than ECS [1]. Please try to build your own extensions to
ECS and don’t forget to burn your computer to FPGA.

Follow that up with Computer Systems A programmers perspective.[2]

My review of ECS [3]

[1] [https://www.amazon.com/Elements-Computing-Systems-
Building-P...](https://www.amazon.com/Elements-Computing-Systems-Building-
Principles/dp/026214087X)

[2] [https://www.amazon.com/Computer-Systems-Programmers-
Perspect...](https://www.amazon.com/Computer-Systems-Programmers-
Perspective-3rd/dp/013409266X)

[3] [https://www.amazon.com/gp/customer-
reviews/RZ4ME4QH22JML/ref...](https://www.amazon.com/gp/customer-
reviews/RZ4ME4QH22JML/ref=cm_cr_getr_d_rvw_ttl)

~~~
lancefisher
I also highly recommended working through The Elements of Computing Systems by
Noam Nisam. There’s more info available at the website
[https://www.nand2tetris.org/](https://www.nand2tetris.org/)

~~~
timkofu
Thanks.

------
mustntmumble
That sounds like a simple question but the answer is very complex. I recommend
you look at old technology that was more simple and easy to understand, and
then start moving forward. Look at the S100 bus and how simple 8 bit
microprocessors such as the Z80 and 6502 did IO.

[https://en.wikipedia.org/wiki/S-100_bus](https://en.wikipedia.org/wiki/S-100_bus)

[https://z80journal.wordpress.com/2015/10/07/z80-io-
space/](https://z80journal.wordpress.com/2015/10/07/z80-io-space/)

Then with x86 PC age, look at the ISA bus first
[https://en.wikipedia.org/wiki/Industry_Standard_Architecture](https://en.wikipedia.org/wiki/Industry_Standard_Architecture)

and later on, the PCI bus (should I even mention Microchannel?) :
[https://en.wikipedia.org/wiki/Conventional_PCI](https://en.wikipedia.org/wiki/Conventional_PCI)

Another direction for computer IO might be to learn about the Raspberry Pi
GPIO interface: [https://learn.sparkfun.com/tutorials/raspberry-
gpio/all](https://learn.sparkfun.com/tutorials/raspberry-gpio/all)

------
kuro68k
Get an 8 bit microcontroller dev board for a few bucks and learn how to
control the peripherals. AVR are good and there is a lot of material online to
learn from. Sorry I don't know any books.

------
alanfranz
I recommend CSAPP, even though I'm not sure it's what you want:
[https://csapp.cs.cmu.edu](https://csapp.cs.cmu.edu) and Inside The Machine.

------
a-dub
I'm surprised there's no mention of the classic Computer Organization and
Design by Patterson and Hennessy. Combine that with a recent book on the Linux
kernel (either the O'Reilly one or I think there's one from Addison-Wesley) or
the BSD red book (design and implementation of 4.4 bsd I think it's called)
and I think you'd have good coverage of the topic.

------
alok-g
While not exactly what you have asked for, I once delivered a related session
intended for software developers -- "How Does a Processor Execute My Code? And
Why?!" If the slides for this would be of interest, reach out to me using
contact information in my profile.

------
poovamraj
You should definitely checkout this book -
[http://www.buthowdoitknow.com/](http://www.buthowdoitknow.com/)

It explains everything in layman's term.

~~~
timkofu
Thanks.

------
sloaken
I would buy a raspberry PI and start with that, or an Arduino.

There is a Arduino simulator (I have not used it, others told me about it) on
Tickercad.

