Basics of programming language to learn coding

The core basics of programming language that you should know

A computer program is a set of instructions through which you express your wishes to the computer about what it had to do.

Computers are the machines that take input and process it, then, return an output

 its engine is the CPU (Central Processing Unit) and the Cpu is the one that does most of the computing work

In programming languages, we solve a problem by designing a solution which is nothing  but developing step by step process to solve a specific problem which we called it as an algorithm

Rendered by QuickLaTeX.com

RAM (Random Access Memory)

Do you know? To open a web page the PC consumes temporary memory (RAM) and To watch a You Tube video, playing video game the PC need RAM,

Hard drive (permanent storage)

The Hard drive Stores the files, source code, videos, audio, images  even the computer turn off

Operating system

Rendered by QuickLaTeX.com

An Operating system is a software that acts as a middle man between a computer user and computer hardware

Operating systems are designed to provide an environment, where user can play games, use the business application, play video, audio, view images, compile programs, edit text

The basic functions of an operating system are a startup, input/output, and storage. besides that,there are three main operating systems

Rendered by QuickLaTeX.com

Integrated development environment( IDE)

IDEs are interpreter ( translator) are designed to translate your high-level code to machine code

Rendered by QuickLaTeX.com

Code

Rendered by QuickLaTeX.com

Rendered by QuickLaTeX.com

Rendered by QuickLaTeX.com

High-level code

Used by programmer’s, shorter and easier to read or write and manipulate. next, Easy to understand ex: Python

Low-level code

The computer’s hardware can understand only a very low-level language called machine language

Example of machine level language

 0x9A, 0x9A, 0xAD, 0xAD, 0x9F, 0x9F, 0x9C, 0x9C, 0x92, 0x92, 0x8D, 0x8D, 0x84, 0x84, 0x7F, 0x7F,
    0x77, 0x77, 0x71, 0x71, 0x75, 0x75, 0x7D, 0x7D, 0x84, 0x84, 0x8B, 0x8B, 0x92, 0x92, 0x99, 0x99,
    0xA0, 0xA0, 0xA7, 0xA7, 0xAE, 0xAE, 0xAA, 0xAA, 0xA3, 0xA3, 0x9C, 0x9C, 0x95, 0x95, 0x8E, 0x8E,
    0x87, 0x87, 0x7F, 0x7F, 0x79, 0x79, 0x71, 0x71, 0x74, 0x74, 0x7C, 0x7C, 0x83, 0x83, 0x8A, 0x8A,
    0x91, 0x91, 0x98, 0x98, 0x9F, 0x9F, 0xA6, 0xA6, 0xAD, 0xAD, 0xAC, 0xAC, 0xA4, 0xA4, 0x9D, 0x9D,
    0x96, 0x96, 0x8F, 0x8F, 0x88, 0x88, 0x81, 0x81, 0x7A, 0x7A, 0x72, 0x72, 0x73, 0x73, 0x7B, 0x7B,
    0x81, 0x81, 0x89, 0x89, 0x8F, 0x8F, 0x97, 0x97, 0x9E, 0x9E, 0xA4, 0xA4, 0xAC, 0xAC, 0xAD, 0xAD,
    0xA5, 0xA5, 0x9E, 0x9E, 0x97, 0x97, 0x90, 0x90, 0x89, 0x89, 0x82, 0x82, 0x7B, 0x7B, 0x73, 0x73,
    0x72, 0x72, 0x79, 0x79, 0x80, 0x80, 0x87, 0x87, 0x8E, 0x8E, 0x95, 0x95, 0x9D, 0x9D, 0xA3, 0xA3,
    0xAB, 0xAB, 0xAD, 0xAD, 0xA7, 0xA7, 0x9F, 0x9F, 0x99, 0x99, 0x91, 0x91, 0x8B, 0x8B, 0x83, 0x83,
    0x7D, 0x7D, 0x75, 0x75, 0x71, 0x71, 0x78, 0x78, 0x7F, 0x7F, 0x86, 0x86, 0x8D, 0x8D, 0x94, 0x94,
    0x9B, 0x9B, 0xA2, 0xA2, 0xAA, 0xAA, 0xAE, 0xAE, 0xA8, 0xA8, 0xA1, 0xA1, 0x9A, 0x9A, 0x92, 0x93,

Well, imagine this

That you have a hardware board and software(operating system)

Okay,

Next, you added both of them and made a perfect device called a computer then you instructed that device called a computer to subtract two numbers through a script called program

At this instant, the Cpu of your computer system will execute your instruction(program) by something like this in the below example

Read the first number from memory address  478522 into the CPU
Read the second number from memory address  478523 into the CPU
Subtract the two numbers in the CPU
Store the result in the memory address 478524
Print the result from memory address 478524

To your naked eyes, it might look like a lot of work

Of course, it is

But in reality, it is even more complicated than this

How?

The truth is, the computer has to obey your instruction to subtract two numbers but the hardware understands only machine language which is 0’s and 1’s

So, that means your computer has to convert the above instructions into a binary notation(0’s and 1’s)

Syntax

The syntax is the set of rules or pattern used to combine different symbols, data type, operators, expressions, pointers to form programming instruction

Consider an example of input and output function, different language has a different way to express the same thing

Rendered by QuickLaTeX.com

The different programming language has a different way to comment in the program

Rendered by QuickLaTeX.com

Data type

The Data types are types of data that can be used in C

Rendered by QuickLaTeX.com

Difference b/w bits and byte

Rendered by QuickLaTeX.com

 keywords

Is a word that has a predefined meaning and it is in build in C compiler. next, C has 32 predefined keywords

Rendered by QuickLaTeX.com

Resource

  • Python programming an introduction to computer science by John Zelle
  • Operating system concepts by Silberschatz Galvin Gagne
  • The audio programming book by Richard Boulanger and Victor Lazzarini

Mohammed Anees

Hey there, welcome to aneescraftsmanship I am Mohammed Anees an independent developer/blogger. I like to share and discuss the craft with others plus the things which I have learned because I believe that through discussion and sharing a new world opens up

Leave a Reply

Your email address will not be published.