What is less clear is if the copyright extends to only the source or to the compiled binary. This is where we need functioning analogies. Is the copyright on a film different from the copyright of the script used to produce the film? If so, it clearly should extend to software, since the analogy between the script being "the source" for the audiovisual experience that is the film has a fairly distinct parallel in how the sourec code is clearly what causes (in conjuction with compilers and linkers) the executable code.
It is, again in analogy with books, proper that copyright extends from source to binary. The binary s but a translation of the source. This does leave open the possibility that more than one legal entity has copyright on the binary, though. A translatoa scopyright on the translation (though not the work itself, if I remember correctly).
This has some interesting implications for older computers, where running software has, in practice, access to the whole of the memory space. It doesn't really trouble us, though, since the other running programs are not relevant to the functioning of our imagined program.
It also means that all programs running on a computer is implicitly derived from the operating system. This isn't too surprising, though, since it's much easier to write non-prortabel software than it is to write portable software. Similarly, there is definite exceptions on the GNU General Public License (GPL) that frees a programemr from concern about depending on system-provided libraries.
Clearly, a book starting that way is not a derived work (especially if it readable without that step being followed). This is, in a way, analogous to software referencing external libraries. They only refer to an external library, by name (and quite often version) and a linking header in the executable file lists all such external libraries that need linking in before the program is runnable.
This is one of Ingvar's essays