First of all: I've got no academic background. I'm working primarily with Java and Spring and I'm also fond of web programming and relational databases. I hope I'm using the right terms and I hope that this vague question makes some sense.

Today the following question came to my mind: How much is modern programming still tied to the underlying digital logic? With modern programming I mean concepts like OOP, AOP, Java 7, AJAX, … I hope you get the idea.

Do they no longer need the digital logic with which computers are working internally? Or is binary logic still ubiquitous when programming this way? If I'd change the inner workings of a computer overnight, would it matter, because my programming techniques are already that abstract?

P. S.: With digital logic I mean the physical representation of everything "inside" the computer as zeroes and ones.

Changed "binary" to "digital".

closed as not a real question by gnat, FrustratedWithFormsDesigner, Walter, EL Yusubov, World Engineer Oct 16 '12 at 1:03

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • by binary logic do you mean Boolean Logic such as the realm of AND, OR, NOT, etc... ? – GlenH7 Oct 15 '12 at 20:06
  • So... every time you use a Boolean variable, that doesn't count? – FrustratedWithFormsDesigner Oct 15 '12 at 20:07
  • @GlenH7 No, I mean that in the end it all boils down to zeroes and ones. – user68850 Oct 15 '12 at 20:11
  • @FrustratedWithFormsDesigner I was more concerned with the physical representation "inside" the computer. I didn't make myself clear enough. – user68850 Oct 15 '12 at 20:13
  • @NewTalk - actually, yes you do mean Boolean Logic then. Logic chip design is ultimately reduced to boolean logic and the combination of the various AND / OR / NOT gates. – GlenH7 Oct 15 '12 at 20:14

Short version is that modern programming is NOT tied to the underlying logic within the chips themselves.

Most / all modern programming languages abstract away that level of interaction. Even if you got to the level of Assembly or specific machine code, you're still not working at the level of the logic on the chip itself.

Digital logic design (which is what you're asking about) is still performed for various chips, but this is definitely a small subset of the programming that goes on today. There are high-level interpreters that facilitate the design and the necessary logic reductions, but they bear little resemblance to something you would recognize as a Java programmer.

Additional thoughts, in broad terms:
The CPU is a chip consisting of bazillions of transistors that are wired together in various ways. The specifics of the wiring is dictated by Boolean Logic and available reductions. Ultimately, the chip offers up an API through the instruction set.

High level languages such as java are ultimately compiled down to machine language, which is a series of instructions being fed to the chip. Java complicates things a little since it goes through a virtual machine in order to generate the chip-level instructions. Other languages use a compiler to generate the associated assembly and machine code.

Even when a high level programming language offers bitwise operations, these operations are not generating new Boolean logic to be executed by the chip. The bitwise operations are exposed through the instruction set of the chip and the compiler / VM allow the high level language to access those operations.

There is an exception to all of this, which is the realm of programmable logic controllers (PLCs). Here, the programmer is ultimately creating the Boolean Logic involved that will drive the chip. However, this logic generation is still generally obscured from the programmer and is built by the compiler for the PLC. You could therefore use the same | similar high level code with a different compiler / PLC and it would (should) still work just fine. There are some nuances with portability, but I'm arbitrarily declaring that out of scope for the question...

  • 4
    One thing a lot of people don't realize is that these days, even x86 processors don't actually "run on" x86. All those operations get digested into some crazy pants internal microcode that the CPU actually executes. Yes, that means that there's yet another layer of abstraction between you and the hardware, even if you're hand-writing x86 assembly :) – Tacroy Oct 15 '12 at 23:15

How much is modern programming still tied to underyling digital logic?

Your question is a lot like asking: How much of everyday life is still tied to physics? Like physics, the digital nature of computers is pervasive: it's what makes them work, and it's what limits them. We may not think in terms of 1's and 0's and AND's and OR's and NOT's when we program, but those are still the atoms that make up our world and their effects are easy to detect. Here are a few examples:

  • A bit is always either 1 or 0, never something else, and never both at the same time.

  • A memory location can only hold one value at a time.

  • Computers are deterministic: given the same data and code, you get the same result every time.

  • Any value can be represented with arbitrary precision, but most values can't be represented exactly.

If I'd change the inner workings of a computer overnight, would it matter, because my programming techniques are already that abstract?

If you change the inner workings of the computer, you'll have to change the way the abstraction layer(s) is implemented so that the abstraction is maintained. For example, if you've got a Python program, it'll run on any machine that provides a Python interpreter. If you replace the Intel processor with an ARM processor, it's a relatively simple thing to modify the Python interpreter so that it continues to work. If you substitute an analog processor or a quantum processor, though, you'll have fundamentally changed the rules of the game, and it may or may not be possible to implement Python correctly. Python is the abstraction layer in this example, but the same goes for any layer.

  • 1
    +1 "How much of everyday life is still tied to physics?" -- That's pretty much the beginning and end of it. – tylerl Oct 15 '12 at 22:21

Many programmers who use higher-level programming languages do not need to be aware of the binary representation of the data that they work with. That doesn't mean the internal binary representation is not important, it just means that it has been hidden behind a layer of abstraction which most of us do not need to peer through. High-level languages such as Java still have bitwise operators for situations where manipulating binary data is necessary.

One place where low-level binary representations of data can sneak up into a high-level language programing environment is when you use floating point numbers.

  • The bitwise operators are also still seen in the APIs - things such as Pattern.compile(".+", Pattern.CASE_INSENSTIVE + Pattern.UNIX_LINES); - the values for the constants are powers of 2 - and that isn't modifying binary data as such. – user40980 Oct 15 '12 at 20:35

Adding to the answer by @Frustrated - One other thing that still has us thinking about the underlying digital logic is threading and parallelism. Until we can take our current high level language programs and, without major change, run them on an n Core processor using all n Cores, then it's arguable we are still locked into thinking about the underlying hardware. We are still 'learning' (i.e. the industry does not have techniques and tools that are widely adopted, reliable and efficient) how to write massively parallel programs.