Author here. They are very different. Code (a fantastic book, by the way) is a technical book that provides an introduction to how computers work from first principles. The Switch is a historical book that describes how the switching components of the first computers evolved in a telecom context (starting from the birth of the telegraph), then were adapted for computing.
There's a bit of crossover insofar as Code uses relays to build an understanding of how digital logic works and has a few brief historical asides. Likewise The Switch provides a few brief technical explanations to help the non-expert reader along. But in general The Switch will not tell you much about how computers work and Code will not tell you much about where they came from.
https://www.amazon.com/Code-Language-Computer-Developer-Prac...