Week 1 Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

I.

Introduction to computer
Computer is an advanced electronic device that takes raw data (as an input) from the user and
processes it under the control of a set of instructions (called program), produces a result
(output), and saves it for future use.

1. Two Different form of computer are exited: analog and digital computer

• An analog computer or „analogue computer‟ which is used to process analog data.


• Today most commonly type of computer that input information using discrete rather than
continuous, is called digital computer that use „binary digits‟.
2. History of Computer

Professor Charles Babbage‟s analytical engine considered as “fundamental framework of


computer” is a mechanical general-purpose programmable computing engine. It was a
successor to the Difference Engine.
Computer that we use today is absolutely different from the first generation computer.
Evolution in technology from 19th century to present day modified computer totally.
3. Uses of Computer

In digital world, from a small wrist watch to space satellite all are controlled by computer.
A small or large machine was handled by humans in past, but in digitalized world these are
handled by programmed humans i.e. „Robots‟.
4. Types of Computer, By Size

According to required services speed or efficiency different types of computers are available
in market.

• Super Computer: Large in size and more powerful. Used for large and complex
calculation.
• Mainframe Computer: Mainframe computers are smaller than supercomputer. It has
large storage capacity and capable to perform large calculation. Used in bank, educational
institution.
• Minicomputer: Minicomputers are multi user which are mainly used by small
organization
• Microcomputer: Microcomputer is defined as small size, inexpensive, easy to carry
computer e.g. Laptop, tablets.
5. Generations of Computer
The modern computer took its shape with the arrival of your time. It had been around 16th
century when the evolution of the computer started. The initial computer faced many
changes, obviously for the betterment. It continuously improved itself in terms of speed,
accuracy, size, and price to urge the form of the fashionable day computer. This long period
is often conveniently divided into the subsequent phases called computer generations:
 First Generation Computers (1940-1956)
 Second Generation Computers (1956-1963)
 Third Generation Computers (1964-1971)
 Fourth Generation Computers (1971-Present)
 Fifth Generation Computers (Present and Beyond)

Before there are graphing calculators, spreadsheets, and computer algebra systems,
mathematicians and inventors searched for solutions to ease the burden of calculation.
Below are the 8 mechanical calculators before modern computers were invented.
1. Abacus (ca. 2700 BC)
2. Pascal‟s Calculator (1652)
3. Stepped Reckoner (1694)
4. Arithmometer (1820)
5. Comptometer (1887) and Comptograph (1889)
6. The Difference Engine (1822)
7. Analytical Engine (1834)
8. The Millionaire (1893)

First Generation Computers: Vacuum Tubes (1940-1956)

 Introduction
1. 1946-1959 is the period of first generation computer.
2. J.P.Eckert and J.W.Mauchy invented the first successful electronic computer called
ENIAC, ENIAC stands for “Electronic Numeric Integrated And Calculator”.
3.
 Advantages:
1. It made use of vacuum tubes which are the only electronic component available
during those days.
2. These computers could calculate in milliseconds.

 Disadvantages:
1. These were very big in size, weight was about 30 tones.
2. These computers were based on vacuum tubes.
3. These computers were very costly.
4. It could store only a small amount of information due to the presence of magnetic
drums.
5. As the invention of first generation computers involves vacuum tubes, so another
disadvantage of these computers was, vacuum tubes require a large cooling system.
6. Very less work efficiency.
7. Limited programming capabilities and punch cards were used to take inputs.
8. Large amount of energy consumption.
9. Not reliable and constant maintenance is required.

Main first generation computers are:


 ENIAC: Electronic Numerical Integrator and Computer, built by J. Presper Eckert and
John V. Mauchly was a general-purpose computer. It had been very heavy, large, and
contained 18,000 vacuum tubes.
 EDVAC: Electronic Discrete Variable Automatic Computer was designed by von
Neumann. It could store data also as instruction and thus the speed was enhanced.
 UNIVAC: Universal Automatic Computer was developed in 1952 by Eckert and
Mauchly.
Main characteristics of first generation computers are:

Main electronic component Vacuum tube.

Programming language Machine language.

Main memory Magnetic tapes and magnetic drums.

Input/output devices Paper tape and punched cards.

Very slow and very large in size (often taking up entire


Speed and size room).

Examples of the first


generation IBM 650, IBM 701, ENIAC, UNIVAC1, etc.

Second Generation Computers: Transistors (1956-1963)


 Introduction
1. 1959-1965 is the period of second-generation computer.
2. 3.Second generation computers were based on Transistor instead of vacuum tubes.
 Few Examples are:
1. Honeywell 400
2. IBM 7094
3. CDC 1604
4. CDC 3600
5. UNIVAC 1108
 Advantages:
1. Due to the presence of transistors instead of vacuum tubes, the size of electron
component decreased. This resulted in reducing the size of a computer as compared
to first generation computers.
2. Less energy and not produce as much heat as the first generation.
3. Assembly language and punch cards were used for input.
4. Low cost than first generation computers.
5. Better speed, calculate data in microseconds.
6. Better portability as compared to first generation
 Disadvantages:
1. A cooling system was required.
2. Constant maintenance was required.
3. Only used for specific purposes.

Main characteristics of second generation computers are:-

Main electronic
component Transistor.

Programming
language Machine language and assembly language.

Memory Magnetic core and magnetic tape/disk.

Input/output devices Magnetic tape and punched cards.

Smaller in size, low power consumption, and generated less heat


Power and size (in comparison with the first generation computers).

Examples of second PDP-8, IBM1400 series, IBM 7090 and 7094, UNIVAC 1107,
generation CDC 3600 etc.
Third Generation Computers: Integrated Circuits. (1964-1971)

 Introduction
1. 1965-1971 is the period of third generation computer.
2. These computers were based on Integrated circuits.
3. IC was invented by Robert Noyce and Jack Kilby In 1958-1959.
4. IC was a single component containing number of transistors.
 Few Examples are:
1. PDP-8
2. PDP-11
3. ICL 2900
4. IBM 360
5. IBM 370
 Advantages:
1. These computers were cheaper as compared to second-generation computers.
2. They were fast and reliable.
3. Use of IC in the computer provides the small size of the computer.
4. IC not only reduce the size of the computer but it also improves the performance of
the computer as compared to previous computers.
5. This generation of computers has big storage capacity.
6. Instead of punch cards, mouse and keyboard are used for input.
7. They used an operating system for better resource management and used the concept
of time-sharing and multiple programming.
8. These computers reduce the computational time from microseconds to nanoseconds.
 Disadvantages:
1. IC chips are difficult to maintain.
2. The highly sophisticated technology required for the manufacturing of IC chips.
3. Air conditioning is required.

Main characteristics of third generation computers are:

Main electronic component Integrated circuits (ICs)

Programming language High-level language

Memory Large magnetic core, magnetic tape/disk

Input / output devices Magnetic tape, monitor, keyboard, printer, etc.

Examples of third IBM 360, IBM 370, PDP-11, NCR 395, B6500, UNIVAC
generation 1108, etc.
Fourth Generation Computers: Micro-processors (1971-Present)

 Introduction:
1. 1971-1980 is the period of fourth generation computer.
2. This technology is based on Microprocessor.
3. A microprocessor is used in a computer for any logical and arithmetic function to be
performed in any program.
4. Graphics User Interface (GUI) technology was exploited to offer more comfort to
users.
 Few Examples are:
1. IBM 4341
2. DEC 10
3. STAR 1000
4. PUP 11
 Advantages:
1. Fastest in computation and size get reduced as compared to the previous generation
of computer.
2. Heat generated is negligible.
3. Small in size as compared to previous generation computers.
4. Less maintenance is required.
5. All types of high-level language can be used in this type of computers.
 Disadvantages:
1. The Microprocessor design and fabrication are very complex.
2. Air conditioning is required in many cases due to the presence of ICs.
3. Advance technology is required to make the ICs.

Main characteristics of fourth generation computers are:

Main electronic Very large-scale integration (VLSI) and the microprocessor (VLSI
component has thousands of transistors on a single microchip).

Memory semiconductor memory (such as RAM, ROM, etc.)

Input/output devices pointing devices, optical scanning, keyboard, monitor, printer, etc.

Examples of fourth
generation IBM PC, STAR 1000, APPLE II, Apple Macintosh, Alter 8800, etc.

Fifth Generation Computers

 Introduction
1. The period of the fifth generation in 1980-onwards.
2. This generation is based on artificial intelligence.
3. The aim of the fifth generation is to make a device which could respond to natural
language input and are capable of learning and self-organization.
4. This generation is based on ULSI(Ultra Large Scale Integration) technology
resulting in the production of microprocessor chips having ten million electronic
component.
 Few Examples are:
1. Desktop
2. Laptop
3. NoteBook
4. UltraBook
5. Chromebook
 Advantages:
1. It is more reliable and works faster.
2. It is available in different sizes and unique features.
3. It provides computers with more user-friendly interfaces with multimedia features.
 Disadvantages:
1. They need very low-level languages.
2. They may make the human brains dull and doomed.

Main characteristics of fifth generation computers are:

Based on artificial intelligence, uses the Ultra Large-Scale Integration


Main (ULSI) technology and parallel processing method (ULSI has millions of
electronic transistors on a single microchip and Parallel processing method use two or
component more microprocessors to run tasks simultaneously).

Language Understand natural language (human language).

Size Portable and small in size.

Input / output Trackpad (or touchpad), touchscreen, pen, speech input (recognize
device voice/speech), light scanner, printer, keyboard, monitor, mouse, etc.

Example of
fifth
generation Desktops, laptops, tablets, smartphones, etc.

II. Von Neumann Architecture


It is also known as ISA (Instruction set architecture) computer and is having three basic
units:
1. The Central Processing Unit (CPU)
2. The Main Memory Unit
3. The Input/Output Device
Let‟s consider them in details.
 Control Unit – A control unit (CU) handles all processor control signals. It directs all
input and output flow, fetches code for instructions, and controls how data moves
around the system.
 Arithmetic and Logic Unit (ALU) – The arithmetic logic unit is that part of the CPU
that handles all the calculations the CPU may need, e.g. Addition, Subtraction,
Comparisons. It performs Logical Operations, Bit Shifting Operations, and Arithmetic
operations.

Figure – Basic CPU structure, illustrating ALU


 Main Memory Unit (Registers) –
1. Accumulator: Stores the results of calculations made by ALU.
2. Program Counter (PC): Keeps track of the memory location of the next
instructions to be dealt with. The PC then passes this next address to Memory
Address Register (MAR).
3. Memory Address Register (MAR): It stores the memory locations of instructions
that need to be fetched from memory or stored into memory.
4. Memory Data Register (MDR): It stores instructions fetched from memory or any
data that is to be transferred to, and stored in, memory.
5. Current Instruction Register (CIR): It stores the most recently fetched
instructions while it is waiting to be coded and executed.
6. Instruction Buffer Register (IBR): The instruction that is not to be executed
immediately is placed in the instruction buffer register IBR.

 Input/Output Devices – Program or data is read into main memory from the input
device or secondary storage under the control of CPU input instruction. Output
devices are used to output the information from a computer. If some results are
evaluated by computer and it is stored in the computer, then with the help of output
devices, we can present them to the user.
 Buses – Data is transmitted from one part of a computer to another, connecting all
major internal components to the CPU and memory, by the means of Buses. Types:
1. Data Bus: It carries data among the memory unit, the I/O devices, and the
processor.
2. Address Bus: It carries the address of data (not the actual data) between memory
and processor.
3. Control Bus: It carries control commands from the CPU (and status signals from
other devices) in order to control and coordinate all the activities within the
computer.

Von Neumann bottleneck – Whatever we do to enhance performance, we cannot get


away from the fact that instructions can only be done one at a time and can only be carried
out sequentially. Both of these factors hold back the competence of the CPU. This is
commonly referred to as the „Von Neumann bottleneck‟. We can provide a Von Neumann
processor with more cache, more RAM, or faster components but if original gains are to be
made in CPU performance then an influential inspection needs to take place of CPU
configuration.

III. Introduction to Programming Paradigms


Paradigm can also be termed as method to solve some problem or do some task.
Programming paradigm is an approach to solve problem using some programming language
or also we can say it is a method to solve a problem using tools and techniques that are
available to us following some approach. The term programming paradigm refers to a style
of programming. It does not refer to a specific language, but rather it refers to the way you
program.

There are lots of programming languages that are well-known but all of them need to
follow some strategy when they are implemented. And that strategy is a paradigm.
1. Imperative Programming Paradigm: It is one of the oldest programming paradigm. It
features close relation to machine architecture. It is based on Von Neumann
architecture. It works by changing the program state through assignment statements. It
performs step by step task by changing state. The main focus is on how to achieve the
goal. The paradigm consists of several statements and after execution of all the result is
stored.
The paradigm consists of several statements, and after the execution of all of them, the
result is stored. It‟s about writing a list of instructions to tell the computer what to do
step by step.
In an imperative programming paradigm, the order of the steps is crucial, because a
given step will have different consequences depending on the current values of
variables when the step is executed.
Advantages:
1. Very simple to implement
2. It contains loops, variables etc.
Disadvantage:
1. Complex problem cannot be solved
2. Less efficient and less productive
3. Parallel programming is not possible

Examples: C, Fortan, BASIC

Imperative programming is divided into three broad categories: Structured, Procedural,


OOP and parallel processing. These paradigms are as follows:
a. Structured Programming Paradigm: Structured programming is a
programming paradigm aimed at improving the clarity, quality, and development
time of a computer program by making extensive use of the structured control
flow constructs of selection (if/then/else) and repetition (while and for), block
structures, and subroutines in contrast to using simple tests and jumps such as
the go to statement, which can lead to “spaghetti code” that is potentially
difficult to follow and maintain.
Key Terms
 Branching: An uncontrolled structure that allows the flow of execution to
jump to a different part of the program.
 Control structures: Mechanisms that allow us to control the flow of
execution within a program.
 Iteration: A control structure that allows some lines of code to be
executed many times.
 Selection: A control structure where the program chooses between two or
more options.
 Sequence: A control structure where the program executes the items in
the order listed.
 Spaghetti code: A pejorative phrase for unstructured and difficult to
maintain source code.
 Structured programming: A method of planning programs that avoids the
branching category of control structures.

b. Procedural Programming Paradigm: This paradigm emphasizes on procedure


in terms of under lying machine model. There is no difference in between
procedural and imperative approach. It has the ability to reuse the code and it
was boon at that time when it was in use because of its reusability. Procedural
programming (which is also imperative) allows splitting those instructions into
procedures. Procedures aren't functions. The difference between them is that
functions return a value, and procedures do not. More specifically, functions are
designed to have minimal side effects, and always produce the same output
when given the same input. Procedures, on the other hand, do not have any
return value. Their primary purpose is to accomplish a given task and cause a
desired side effect. A great example of procedures would be the well known for
loop. The for loop's main purpose is to cause side effects and it does not return a
value.
Example: C
C++
Java
ColdFusion
Pascal
Advantages:
• It's simple.
• An easier way to keep track of program flow.
• It has the ability to be strongly modular or structured.
• Needs less memory: It's efficient and effective.

c. Object Oriented Programming Paradigm: The program is written as a


collection of classes and object which are meant for communication. The
smallest and basic entity is object and all kind of computation is performed on
the objects only. More emphasis is on data rather procedure. It can handle
almost all kind of real life problems which are today in scenario.
The key characteristics of object-oriented programming include Class,
Abstraction, Encapsulation, Inheritance and Polymorphism.
A class is a template or blueprint from which objects are created.

Describes the key concepts of object-oriented programming


Objects are instances of classes. Objects have attributes/states and methods/behaviors.
Attributes are data associated with the object while methods are actions/functions that the
object can perform.
Explains the states and behaviors of an object
Abstraction separates the interface from implementation. Encapsulation is the process of
hiding the internal implementation of an object.
Inheritance enables hierarchical relationships to be represented and refined. Polymorphism
allows objects of different types to receive the same message and respond in different ways.
Examples:
• Python
• Ruby
• Java
• C++
• Smalltalk
Advantages:
 Reuse of code through Inheritance.
 Flexibility through Polymorphism.
 High security with the use of data hiding (Encapsulation) and Abstraction mechanisms.
 Improved software development productivity: An object-oriented programmer can stitch
new software objects to make completely new programs
 Faster development: Reuse enables faster development
 Lower cost of development: The reuse of software also lowers the cost of development.
Typically, more effort is put into the object-oriented analysis and design (OOAD), which
lowers the overall cost of development
 Higher-quality software: Faster development of software and lower cost of development
allows more time and resources to be used in the verification of the software. Object-
oriented programming tends to result in higher-quality software

2. Declarative / Non-Imperative Programming Paradigm: Declarative


programming is a high-level programming concept, which is the opposite of
imperative programming. It is typically found in databases and configuration
management software, paired with a domain-specific language (DSL). Declarative
models rely on preconfigured capabilities in the language to accomplish a task
without explicit case-by-case instructions on what steps to take. Declarative
programming relies on underlying components of a given language to carry out the
necessary steps to reach the stated outcome. In declarative programming, typical
programming constructs such as loops and if/then conditions do not exist, because
they are instructional.
Declarative programming focuses on the end result, while imperative programming
focuses on how to get there. For example, when you jump in a taxi, you declare to
the driver where you want to go. You don't tell him how to get there by providing
turn-by-turn directions. The turn-by-turn directions are akin to imperative
programming.
Declarative programming builds on the capabilities developed by imperative
programming, but enables the developer to focus on problem resolution rather than
intricacies of code setup.

Advantages Disadvantages

Short, efficient code Sometimes hard to understand for


external people

Can be implemented using methods not yet Based on an unfamiliar conceptual


known at the time of programming model for people (solution state)

Easy optimization as implementation is Hard to take characteristics of


controlled by an algorithm individual applications into account
during programming

Maintenance possible independent of


application development

 Logic programming paradigms – It can be termed as abstract model of computation.


It would solve logical problems like puzzles, series etc. In logic programming we have
a knowledge base which we know before and along with the question and knowledge
base which is given to machine, it produces result. In normal programming languages,
such concept of knowledge base is not available but while using the concept of artificial
intelligence, machine learning we have some models like Perception model which is
using the same mechanism.
In logical programming the main emphasize is on knowledge base and the problem. The
execution of the program is very much like proof of mathematical statement, e.g.,
Prolog
Advantages:
1. Easy to implement the code.
2. Debugging is easy.
3. Since it's structured using true/false statements, we can develop the programs
quickly using logic programming.
4. As it's based on thinking, expression and implementation, it can be applied in
non-computational programs too.
5. It supports special forms of knowledge such as meta-level or higher-order
knowledge as it can be altered.

 Functional programming paradigms – The functional programming paradigms has


its roots in mathematics and it is language independent. The key principle of this
paradigms is the execution of series of mathematical functions. The central model for
the abstraction is the function which are meant for some specific computation and not
the data structure. Data are loosely coupled to functions.The function hide their
implementation. Function can be replaced with their values without changing the
meaning of the program. Some of the languages like perl, javascript mostly uses this
paradigm. Examples of Functional programming paradigm: JavaScript, Haskell, Scala,
Erlang, Lisp, ML, Clojure
Concepts of functional programming:
 Pure functions
 Recursion
 Referential transparency
 Functions are First-Class and can be Higher-Order
 Variables are Immutable

Advantages:
1. Pure functions are easier to understand because they don‟t change any states and
depend only on the input given to them. Whatever output they produce is the return
value they give. Their function signature gives all the information about them i.e.
their return type and their arguments.
2. The ability of functional programming languages to treat functions as values and
pass them to functions as parameters make the code more readable and easily
understandable.
3. Testing and debugging is easier. Since pure functions take only arguments and
produce output, they don‟t produce any changes don‟t take input or produce some
hidden output. They use immutable values, so it becomes easier to check some
problems in programs written uses pure functions.
4. It is used to implement concurrency/parallelism because pure functions don‟t
change variables or any other data outside of it.
5. It adopts lazy evaluation which avoids repeated evaluation because the value is
evaluated and stored only when it is needed.
Disadvantages:
1. Sometimes writing pure functions can reduce the readability of code.
2. Writing programs in recursive style instead of using loops can be bit intimidating.
3. Writing pure functions are easy but combining them with the rest of the application
and I/O operations is a difficult task.
4. Immutable values and recursion can lead to decrease in performance.
Applications:
 It is used in mathematical computations.
 It is needed where concurrency or parallelism is required.

 Database/Data driven programming approach – This programming methodology is


based on data and its movement. Program statements are defined by data rather than
hard-coding a series of steps. A database program is the heart of a business information
system and provides file creation, data entry, update, query and reporting functions.
There are several programming languages that are developed mostly for database
application. For example SQL. It is applied to streams of structured data, for filtering,
transforming, aggregating (such as computing statistics), or calling other programs. So
it has its own wide application.

One of the characteristics of a language is its support for particular programming paradigms.
For example, Smalltalk has direct support for programming in the object-oriented way, so it
might be called an object-oriented language. OCaml, Lisp, Scheme, and JavaScript programs
tend to make heavy use of passing functions around so they are called “functional languages”
despite having variables and many imperative constructs.

Applications:

1. Working with databases to structure them.


2. Accessing, modifying, updating data on the database.
3. Communicating with servers.

Advantages:

1. Massive amount of data is handled by the database: Unlike spreadsheet or other


tools, databases are used to store large amount of data daily.
2. Accurate: With the help of built-in functionalities in a database, we can easily
validate.
3. Easy to update data: Data Manipulation Languages (DML) such as SQL are used to
update data in a database easily.
4. Data integrity: With the help of built-in validity checks, we can ensure the
consistency of data.

There are two very important observations here:

 Very few languages implement a paradigm 100%. When they do, they are pure. It is
incredibly rare to have a “pure OOP” language or a “pure functional” language. A lot
of languages have a few escapes; for example in OCaml, you will program with
functions 90% or more of the time, but if you need state, you can get it. Another
example: very few languages implement OOP the way Alan Kay envisioned it.

 A lot of languages will facilitate programming in one or more paradigms. In Scala


you can do imperative, object-oriented, and functional programming quite easily. If a
language is purposely designed to allow programming in many paradigms is called
a multi-paradigm language. If a language only accidentally supports multiple
paradigms, we don‟t have a special word for that.

IV. NUMBER SYSTEM

The technique to represent and work with numbers is called number system. Decimal number
system is the most common number system. Other popular number systems include binary number
system, octal number system, hexadecimal number system, etc.
The value of each digit in a number can be determined using −
 The digit
 The position of the digit in the number
 The base of the number system (where the base is defined as the total number of digits
available in the number system)

Decimal Number System:


The number system that we use in our day-to-day life is the decimal number system. Decimal
number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the
successive positions to the left of the decimal point represent units, tens, hundreds, thousands,
and so on.
Each position represents a specific power of the base (10). For example, the decimal number
1234 consists of the digit 4 in the units position, 3 in the tens position, 2 in the hundreds
position, and 1 in the thousands position.
Its value can be written as
(1 x 1000)+ (2 x 100)+ (3 x 10)+ (4 x l)
(1 x 103)+ (2 x 102)+ (3 x 101)+ (4 x l00)
1000 + 200 + 30 + 4
1234
As a computer programmer or an IT professional, you should understand the following
number systems which are frequently used in computers.

S.No. Number System and Description

1 Binary Number System


Base 2. Digits used : 0, 1

2 Octal Number System


Base 8. Digits used : 0 to 7

3 Hexa Decimal Number System


Base 16. Digits used: 0 to 9, Letters used : A- F

Binary Number System:


Characteristics of the binary number system are as follows −
Uses two digits, 0 and 1
Also called as base 2 number system
Each position in a binary number represents a 0 power of the base (2). Example 20
Last position in a binary number represents a x power of the base (2). Example
2x where x represents the last position - 1.
Example
Binary Number: 101012
Calculating Decimal Equivalent −

Step Binary Number Decimal Number

Step 1 101012 ((1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10


Step 2 101012 (16 + 0 + 4 + 0 + 1)10

Step 3 101012 2110

Note − 101012 is normally written as 10101.

Octal Number System:


Characteristics of the octal number system are as follows −
 Uses eight digits, 0,1,2,3,4,5,6,7
 Also called as base 8 number system
 Each position in an octal number represents a 0 power of the base (8). Example 80
 Last position in an octal number represents a x power of the base (8). Example
8x where x represents the last position - 1
Example
Octal Number: 125708
Calculating Decimal Equivalent −

Step Octal Number Decimal Number

Step 1 125708 ((1 x 84) + (2 x 83) + (5 x 82) + (7 x 81) + (0 x 80))10

Step 2 125708 (4096 + 1024 + 320 + 56 + 0)10

Step 3 125708 549610

Note − 125708 is normally written as 12570.

Hexadecimal Number System:


Characteristics of hexadecimal number system are as follows −
 Uses 10 digits and 6 letters, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
 Letters represent the numbers starting from 10. A = 10. B = 11, C = 12, D = 13, E =
14, F = 15
 Also called as base 16 number system
 Each position in a hexadecimal number represents a 0 power of the base (16).
Example, 160
 Last position in a hexadecimal number represents a x power of the base (16). Example
16x where x represents the last position - 1
Example
Hexadecimal Number: 19FDE16
Calculating Decimal Equivalent −
Step Binary Decimal Number
Number

Step 1 19FDE16 ((1 x 164) + (9 x 163) + (F x 162) + (D x 161) + (E x 160))10

Step 2 19FDE16 ((1 x 164) + (9 x 163) + (15 x 162) + (13 x 161) + (14 x 160))10

Step 3 19FDE16 (65536+ 36864 + 3840 + 208 + 14)10

Step 4 19FDE16 10646210

You might also like