# computer science – What is programming logic and computational thinking?

## Question:

Lately I've been looking at some programming courses and I noticed that they talk about a lot of things like frameworks and tools and focus little on the language itself, and that led me to question something about programming logic, and a basic question that came to me in this way was about computational thinking.

I haven't found any courses that address this in a way that isn't superficial, let alone books (I haven't found any more I think there should be) on computational thinking and logic.

Therefore, I would like these doubts to be resolved.

# Doubts

1. What would this programming logic and computational thinking be?
2. What is the relationship that one has with the other?

Look, this question is very profound and the answer can be exhaustive, let's try to summarize it in a complementary way:

Do you know or have heard of the Assembly?

I'll put a little code snippet here, it might be fun:

``````MOV AH,01h      ;Função 1 do DOS (leitura de caractere)
INT 21h         ;lê 1o caracter, retorna código ASCII ao registrador AL
MOV BL,AL       ;move o código ASCII para o registrador BL por enquanto
INT 21h         ;lê 2o caracter, retorna código ASCII ao registrador AL
;--- Impressão dos 2 caracteres, na ordem invertida ---
MOV AH,02h      ;Função 2 do DOS (escrita de caractere)
MOV DL,AL       ;move o código ASCII do 2o caractere lido p/ DL
INT 21h         ;imprime o caractere cujo codigo está em DL
MOV DL,BL       ;move o código ASCII do 1o caracter lido p/ DL
MOV AH,2h       ;função 2h, imprime caracter
INT 21h         ;imprime o caractere cujo codigo está em DL
``````

This excerpt (which can be found in the UFES handout) shows how to write a code that enters two characters and prints them in reverse order.

What happens here is basically an assimilation into the human brain, of how things are allocated, in the computer it is necessary to indicate directly (point out exactly where the information will be allocated in memory), the computational thinking is this and, if you stop to think, it's something very limited and that gives the impression that the machine is an extremely dumb thing… And that's exactly it, it is!

This is where programming logic comes in.

In programming logic, when we go to higher-level languages, we are offered conditions that abstract these numerous and complex cases of machine language, which, as complex as it seems, is something very simple compared to machine language, which is it boils down to electrical states (on and off, represented by 1 and 0, binary language, that you definitely know what it is). These conditions of high-level languages ​​like C, C++ or C# (which look like low-level things if bought from Python, PHP…) are, for example, if's, else's, variables and several other functions that languages ​​offer.
These functionalities that are simpler to be read facilitate the human-machine relationship, which allow us to create more complex functions and which make the computer more powerful.

A simple comparison of these ways of thinking is for example ENIAC, which was programmed purely with binary language, did not even have the potential of a modern calculator, the thinking of machines today is of a completely different potential and its thinking power (enabled by the new computational techniques that emerge) has an evolution that, according to computer science, doubles its power every two years, which is frightening in a way.

I hope you have solved your doubts, if there is anything that has not elucidated you just ask. Until later.

Scroll to Top