In computing, "code" refers to a set of instructions written in a programming language that tells a computer what to do. It consists of statements, expressions, and other constructs that are used to create programs.
Charles Babbage conceptualized the idea of a programmable mechanical computer, known as the Analytical Engine. Although Babbage's design was never completed, it laid the foundation for modern computing.
Babbage's Analytical Engine design
Punched cards used for programming the Analytical Engine
Ada Lovelace, often considered the world's first computer programmer, wrote an algorithm for the Analytical Engine in the mid-19th century. Her work on the engine's programming is considered pioneering in the field of computing.
Ada Lovelace (1815-1852), Mathematician and Writer
The development of electronic computers led to the creation of early programming languages such as assembly language and machine code. These languages directly corresponded to the instructions executed by the computer's hardware.
Computer is a machine and understands machine language only, consisting of only 0s and 1s in binary that a computer can understand.
In the real world we communicate using different languages. Similarly, each programming language has its own collection of keywords and syntax for constructing instructions.
Programming languages use Compiler or Interpreter to convert high-level language to low-level language that machines can understand.
Focus on WHAT to do
Visual Programming & AI
Low-Level Languages: First two generations (1GL, 2GL)
High-Level Languages: Next three generations (3GL, 4GL, 5GL)
Machine Language
No AbstractionAssembly Language
Less AbstractionHuman-like Languages
Higher AbstractionHigh-level language is a computer language which can be understood by users. It's very similar to human languages and has a set of grammar rules that make instructions more easily understandable.
Machine language provides no abstraction, assembly language provides less abstraction, and high-level languages provide higher abstraction by hiding internal implementation details.
The oldest and most basic programming approach. Code describes a step-by-step process for program execution. Developers focus on how to get an answer step by step.
Classification of Programming Paradigms (Source: Medium)
Writing declarative code forces you to ask first what you want out of your program rather than how to achieve it.
Over the years, some imperative languages have received updates allowing them to support declarative-style programming. Examples: Java, Python
The evolution of programming has been marked by major transitions:
AI and ML technologies are reshaping industries. Growing demand for skills in natural language processing, computer vision, and deep learning.
Democratizing software development, enabling non-technical individuals to create applications. Traditional programming skills remain valuable alongside these platforms.
From Machine Code to AI-Driven Languages
Imperative, Declarative, and Multi-Paradigm
Adapting to New Computing Challenges
ON = 1
OFF = 0
Easy to distinguish
between two states
Perfect for
Boolean operations
Size: 1 byte (8 bits)
Range: -128 to 127
Use: Single characters
Size: 4 bytes (32 bits)
Range: -2³¹ to 2³¹-1
Use: Whole numbers
Size: 4 bytes (32 bits)
Precision: ~7 decimal digits
Use: Decimal numbers
Size: 8 bytes (64 bits)
Precision: ~15 decimal digits
Use: High-precision decimals
8 bits
Smallest addressable unit
Usually 4 bytes
Size of int on most systems
0 = Positive
1 = Negative
Power of 2
(Biased by 127)
Fractional part
(Significant digits)
Method: Divide by 2, collect remainders
Example: 13 Ć· 2 = 6 R1
6 Ć· 2 = 3 R0
3 Ć· 2 = 1 R1
1 Ć· 2 = 0 R1
Result: 1101
Method: Sum powers of 2
Example: 1101
1Ć2³ + 1Ć2² + 0Ć2¹ + 1Ć2ā°
8 + 4 + 0 + 1
Result: 13
Base 16: 0-9, A-F
Example: 13āā = Dāā
Binary: 1101ā = Dāā
Use: Compact representation
Base 8: 0-7
Example: 13āā = 15ā
Binary: 1101ā = 15ā
Use: Historical importance
Memory: 4 bytes
Hex: 0x0000002A
ASCII: 67
Memory: 1 byte
Hex: 0x43
H: ASCII 72 (0x48)
i: ASCII 105 (0x69)
Memory: 3 bytes (including \\0)
Storage: [72][105][0]
IEEE 754:
Sign: 0 (positive)
Exponent: Biased
Mantissa: Fraction bits
Memory: 4 bytes