If I understand your question right you want to know the cognitive priciples behind computing, so why people decided there was a need for a computer and how they went about creating the code and hardware to do it?
Computers were developed like most things in a series of steps, each becoming more and more complex and smaller. Basic computers have been around for thousands of years, see
Abaci and the
Antikythera mechanism.
A computer at its simplest is a device into which you place input data, the computer processes this data and provides you with output data.
This can be as simple as two gears with a ratio of 1:20, you can calculate 20 x Any Number, if you want to calculate 20x5 rotate the larger gear 5 times and count the number of times the smaller cog rotates. The number of times the small cog rotates will be the answer.
Over time people have used the contemporary technology to produce devices which when provided with an input, process that input and provide you with an output.
Modern computers are actually very simple, they do nothing different (in principle) than those gears I mentioned earlier, they just do it much quicker and more complete more calculations simultaneously. The fundemental idea is the same as it has been for thousands of years, it's just the technology used has
evolved.
I guess you can think of a computer code as a gear ratio, you have a couple of wheels with no teeth, the programmer figures out what calculation he needs to do and then places the correct teeth (the code) on the wheels so they become gears with the desired ratio. These gears are of course metaphoric and in modern technology the calculations are done using a series of transistors, tiny switches which have an ON and OFF position, represented by 1 and 0, which is where binary code comes from, 1011010101011100110.
Binary code is the basis of all computer codes, other codes such as C++ have been developed to make programming simpler, but all a code such as C++ is, is a tool to make manipulating binary easier, it would be a bitch typing 1s and 0s all day!
To give you some idea of the number of ON/OFF switches required to play Call of Duty a microprocessor has around 3 billion transistors.
Kindest Regards,
Jack