Sie sind auf Seite 1von 38

Unit-1

What is a Computer?
Computer is an electronic device that manipulates information or data. It has the ability to store,
retrieve and process the data. You can use a computer to type documents, send email, and surf the
Internet. You can also use it to handle spreadsheets, accounting, database management,
presentations, games and more.
A computer is composed of hardware and software, and can exist in a variety of sizes and
configurations
The term hardware refers to the physical components of your computer such as the system unit, mouse,
keyboard, monitor etc.
The software is the set of instructions that make the computer work. Software is held either on your
computers hard disk, CD-ROM, DVD or on a diskette (floppy disk) and is loaded (i.e. copied) from
the disk into the computers RAM (Random Access Memory), as and when required.
1. With a neat schematic block diagram of a digital computer describe its functional units.

Input Unit: Input unit is used to input some sort of data into the computer. Computers accept coded information
through input units, which read data. It converts the data into a suitable form that can be understood
by the Computer.
The converted data is stored in the form of 0s and 1s and then sent to Central processing unit
The user can also interact with other devices such as CPU, MU and output unit
Examples:
A keyboard is an input device that inputs characters.
Many other kinds of input devices are available, including joysticks, trackballs, and mouse, which
can be used as pointing device.
Touch screens are often used as graphic input devices in conjunction with displays.

Unit-1

Microphones can be used to capture audio input which is then sampled and converted into digital
codes for storage and. processing. Cameras and scanners are used as to get digital images.
Output unit: Its main function is to send processed results to the outside world that is used to display the
processed results.
Accepts the result or data from memory which are in the form of 0s and 1s.
Output the results or data to a form which is suitable for human understanding.
Examples :
Video terminals and graphic displays.
The most familiar example of such a device is a printer. Printers employ mechanical impact heads,
ink-jet streams, or photocopying techniques, as in laser printers, to perform the printing.
Monitors, Speakers, Headphones and projectors are also some of the output devices.
Storage devices such as hard disk, floppy disk, flash drives are also used for input as well as output.
Central Processing Unit; The central processing unit (CPU) of a computer is a hardware device that executes all the
instructions of a computer program.
It performs basic arithmetical, logical, and input/output operations of a computer system.
This is the unit through which the computer processes all the data accepted through the input unit.
It consists of two functional units: 1. Arithmetic and Logic Unit (ALU)
2. Control Unit (CU)
1. Arithmetic and Logic Unit (ALU);o An ALU consists of electronic circuitry which performs calculations with basic arithmetic
operations such as addition (+), subtraction (-), multiplication (*), division (/).
o It also consists of logic circuitry which performs logic operations like true or false, yes or no.
2. Control Unit (CU):o The control unit is a component of a computer's central processing unit (CPU) which directs
operation of the processor.
o It controls communication and co-ordination between input/output devices.
o It reads and interprets instructions and determines the sequence for processing the data.
o It performs the tasks of fetching, decoding, managing execution and, finally, storing results
o The control unit is the circuitry that controls the flow of data through the processor, and coordinates
the activities of the other units within it.
Memory Unit (MU):The Term Computer Memory is defined as one or more sets of chips that store Data/program
instructions, either temporarily or permanently.
Two types of memory units:
1. Primary Memory or Main Memory
2. Secondary Memory
1. Main Memory / Primary Memory unit:
RAM(Random Access Memory)

Unit-1

RAM or Random Access Memory is the central storage unit in a computer system. It is the place in a
computer where the operating system, application programs and the data in current use are kept temporarily
so that they can be accessed by the computers processor. The more RAM a computer has, the more data a
computer can manipulate.
Random access memory, also called the Read/Write memory, is the temporary memory of a
computer. It is said to be volatile since its contents are accessible only as long as the computer is on. The
contents of RAM are cleared once the computer is turned off.
ROM(Read-only Memory)
ROM or Read Only Memory is a special type of memory which can only be read and contents of which are
not lost even when the computer is switched off. It typically contains manufacturers instructions. Among
other things, ROM also stores an initial program called the bootstrap loader whose function is to start the
computer software operating, once the power is turned on.
Read-only memories can be manufacturer-programmed or user-programmed. While manufacturerprogrammed ROMs have data burnt into the circuitry, user-programmed ROMs can have the user load and
then store read-only programs. PROM or Programmable ROM is the name given to such ROMs.
Information once stored on the ROM or PROM chip cannot be altered. However, another type of
memory called EPROM (Erasable PROM) allows a user to erase the information stored on the chip and
reprogram it with new information. EEPROM (Electrically EPROM) and UVEPROM (Ultra Violet
EPROM) are two types of EPROMs.
CPU Registers
A register is a very small amount of very fast memory that is built into the CPU. All data must be
represented in a register before it can be processed.
For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is
also placed in a register.
A processor often contains several kinds of registers such as
data registers: can hold numeric values such as integer and, floating-point values, as well as
characters, small bit arrays and other data.
address registers : hold addresses and are used by instructions that indirectly access primary
memory.
instruction register : holding the instruction currently being executed.
Constant registers hold read-only values such as zero, one, or pi. AND SO ON
Cache memory:
Its a high speed memory and is placed between CPU and main memory.
The data and instructions stored in it are accessed at a higher speed
Users cannot access this memory
It stores data and instructions that are currently to be executed.
2. Secondary Memory:

Unit-1

It is the permanent memory which stores large amount of data and instructions permanently.
Its also called back up memory or auxiliary memory.
It is connected to CPU and is made of magnetic material. It is much cheaper than the main storage.
Secondary memory is a non volatile memory.
Non volatile memory: The memory that retains its contents permanently even after the computer is
turned off. They hold the data permanently.
E.g. Floppy disc, hard disc, CD.
2. Discrete Components of a Computer
The term computer is used to describe a device made up of electronic and electro mechanical components
Motherboard:
A motherboard is one of the most essential parts of a computer system. It holds together many
of the crucial components of a computer, including the central processing unit (CPU), memory and
connectors for input and output devices. The base of a motherboard consists of a very firm sheet of nonconductive material, typically some sort of rigid plastic. Thin layers of copper or aluminum foil, referred to
as traces, are printed onto this sheet. These traces are very narrow and form the circuits between the various
components. In addition to circuits, a motherboard contains a number of sockets and slots to connect the
other components.

FIG: MOTHERBOARD

Processor:
A processor is the logic circuitry that responds to and processes the basic instructions that drives a computer.
The processor reads the commands from the memory and then executes them. The processor is one of the
most expensive parts of the computers and is also one of the smallest parts.
MEMORY DEVICES:

Unit-1

Memory: Is used to hold programs and data during execution.


RAM: Primary memory is often called as RAM (Random Access Memory). It holds all the programs and
data the processor is using at a given time. RAM is volatile because its contents are erased when power is
switched off.
ROM: The other type of system memory is ROM (Read only Memory) which is permanent because it
contents are not erased even when power is switched off. It is usually used to load an operating system.
Hard disk :
A hard disk drive (HDD)is a data storage device used for storing and retrieving digital data
information using rapidly rotating disks(platter) coated with magnetic material. An HDD retains its data even
when powered off. Data is read in a random-access manner, meaning individual blocks of data can be stored
or retrieved in any order rather than sequentially. An HDD consists of one or more rigid ("hard") rapidly
rotating disks (platters) with magnetic heads arranged on a moving actuator arm to read and write data to the
surfaces.
CD-ROM :
CD-ROM stands for compact disk read only memory. It consists of small disks similar to the
gramophone records to hold digital information. As the name applies they are read only medium. With the
advancement in technology writable CDs are also available.
Keyboard:
The keyboard is the main input device for most computers. It is used to input text or enter commands into
the PC. Nowadays keyboards with additional features are available like multimedia keyboard, wireless
keyboard.
Mouse:
With the invention of graphical user interface mouse is used to input information into the computer. Users
simply point and click to enter information. The main advantage of mouse over keyboard is simplicity. And
there are many operations that are much easier to perform with a mouse then a keyboard.
Monitor:
The monitor is the specialized high-resolution screen similar to a television. The video card sends the
contents of its video memory to the monitor at a rate of 60 or more time per second. The actual display
screen is made up of red, green and blue dots that are illuminated by electron beam from behind. The video
card DAC chip controls the movement of the electron beam, which then controls what dots are turned on and
how bright they are, which then determines the picture you see on the screen.
Power supply:
SMPS (Switch Mode Power Supply): The power supply supplies power to every single part in the PC. The
main function of the power supply is to convert the 230 V AC into 3.3 V, 5 V and 12 V DC power that the
system requires for the operations.
In addition to supplying power to run the system, the power supply also ensures that the system does not run
unless the power supplied is sufficient to operate the system properly. The power supply completes internal

Unit-1

checks and tests before allowing the system to start. If the tests are successful, the power supply sends a
special signal to the motherboard called Power_Good.
If this signal is not present continuously, the computer does not run. Therefore, when the AC voltage dips
and the power supply becomes stressed or overheated, the Power_Good signal goes down and forces a
system reset or complete shutdown.
BIOS:
BIOS stands for Basic input and Output system. BIOS is a chip located on all motherboards that
contain instructions and setup for how your system should boot and how it operates.
The four main functions of BIOS
POST - Test the computer hardware and make sure no errors exist before loading the operating
system.
Bootstrap Loader: A Boot loader is the first program (stored in ROM) which executes (before the
main program) whenever a system is initialized. It is used to bootstrap a computer. The term boot is used to
describe the process taken by the computer when turned on that loads the operating system and prepares the
system for use.
BIOS drivers - Low level drivers that give the computer basic operational control over your
computer's hardware.
BIOS or CMOS Setup - Configuration program that allows you to configure hardware settings
including system settings such as computer passwords, time, and date.
CMOS battery:
CMOS (complementary metal-oxide-semiconductor) is the term usually used to describe the small
amount of memory on a computer motherboard that stores the BIOS settings.
It stores information such as the system time and date and the system hardware settings for your
computer. The standard lifetime of a CMOS battery is around 10 Years.
Peripheral Devices:
Any external device, which is not necessary to perform the basic operation of computer, is called as
peripherals. They provide additional computing capabilities. For ex: Printers, Modems, and Speakers etc.
Modem:
Modem (Modulator and Demodulator) is typically used to send digital data over a phone line. The
sending modem converts digital data into analog data, which can be transmitted over telephone lines, and the
receiving modem converts the analog data back into digital form. This is used to connect to Internet.

Unit-1

Printers
It is a device that must be connected to a computer which allows a user to print items on paper, such as
letters and pictures.
It can also work with digital cameras to print directly without the use of a computer.
Different types of printers are 1) Laser 2) Inkjet 3) Dot-Matrix.

3. Computer Networks:
What is Network?

A network consists of two or more computers that are linked (connected) together in order to share
resources (such as printers and CDs), exchange files, or allow electronic communications.

The computers on a network may be linked through cables, telephone lines, radio waves, Satellites,
or infrared light beams.

3.1 Network Topologies:


Network topology is the arrangement of the various elements (links, nodes, etc.) of a computer network.
They describe the physical and logical arrangement of the network nodes. (The way devices on the network
are physically connected is known as the topology).

The physical topology of a network refers to the configuration of cables, computers, and other
peripherals
Different Types of Topologies:
Bus Topology
Star Topology
Ring Topology
Mesh Topology
Tree Topology
Hybrid Topology
Bus Topology:
Bus Topology is the simplest of network topologies. In this type of topology, all the nodes (computers as
well as servers) are connected to the single cable (called bus), by the help of interface connectors. This
central cable is the backbone of the network and is known as Bus (thus the name). Every workstation
communicates with the other device through this Bus.
A signal from the source is broadcasted and it travels to all workstations connected to bus cable. Although
the message is broadcasted but only the intended recipient, whose MAC address or IP address matches,
accepts it. If the MAC /IP address of machine doesnt match with the intended address, machine discards the
signal.

Unit-1

A terminator is added at ends of the central cable, to prevent bouncing of signals. A barrel connector can be
used to extend it. Below I have given a basic diagram of a bus topology and then have discussed advantages
and disadvantages of Bus Network Topology
Bus topologies use coaxial cable.

Advantages of Bus Topology:


1.
2.
3.
4.

It is easy to set-up and extend bus network.


Cable length required for this topology is the least compared to other networks.
Bus topology costs very less.
Linear Bus network is mostly used in small networks. Good for LAN.

Disadvantages of Bus Topology


1. There is a limit on central cable length and number of nodes that can be connected.
2. Dependency on central cable in this topology has its disadvantages. If the main cable (i.e. bus )
encounters some problem, whole network breaks down.
3. Bus networks are important to pay careful attention to termination. Each end of the trunk cable needs to
be properly terminated. Without termination the signal will bounce back down the cable causing
collisions.
4. It is difficult to detect and troubleshoot fault at individual station.
5. Maintenance costs can get higher with time.
6. Efficiency of Bus network reduces, as the number of devices connected to it increases.
7. It is not suitable for networks with heavy traffic.
8. Security is very low because all the computers receive the sent signal from the source.

Ring Topology:

Ring topology is a computer network configuration where the devices are connected to each other in a
circular shape. In a ring network, every device has exactly two neighbors for communication purposes.
Data travels around the network, in one direction. Sending and receiving of data takes place by the help
of TOKEN.

Unit-1

Token contains a piece of information which along with data is sent by the source computer. This token
then passes to next node, which checks if the signal is intended to it. If yes, it receives it and passes the
empty token into the network, otherwise passes token along with the data to next node. This process
continues until the signal reaches its intended destination.
The nodes with token are the ones only allowed to send data. Other nodes have to wait for an empty
token to reach them. This network is usually found in offices, schools and small buildings.

Advantage of Ring Topology

This type of network topology is very organized. Each node gets to send the data when it receives an
empty token. This helps to reduces chances of collision. Also in ring topology all the traffic flows in
only one direction at very high speed.
Even when the load on the network increases, its performance is better than that of Bus topology.
There is no need for network server to control the connectivity between workstations.
Additional components do not affect the performance of network.
Each computer has equal access to resources.

Disadvantages of Ring Topology


Each packet of data must pass through all the computers between source and destination. This makes
it slower than Star topology.
If one workstation or port goes down, the entire network gets affected.
Network is highly dependent on the wire which connects different components.
Star Topology:

In a star network, each node (file server, workstations, and peripherals) is connected to a central device
called a hub.
The hub takes a signal that comes from any node and passes it along to all the other nodes in the
network.
Data on a star network passes through the hub, switch, or concentrator before continuing to its
destination.
The hub, switch, or concentrator manages and controls all functions of the network.
The star topology reduces the chance of network failure by connecting all of the systems to a central
node.

Unit-1

Advantages of Star Topology


Easy to manage
Easy to locate problems (cable/workstations)
Easier to expand than a bus or ring topology.
Easy to install and wire.
Easy to detect faults and to remove parts.
Disadvantages of Star Topology
Requires more cable length than a linear topology.
If the hub or concentrator fails, nodes attached are disabled.
More expensive because of the cost of the concentrators
Tree Topology:

A tree topology (hierarchical topology) can be viewed as a collection of star networks arranged in a
hierarchy.
This tree has individual peripheral nodes which are required to transmit to and receive from one other
only and are not required to act as repeaters or regenerators.
The tree topology arranges links and nodes into distinct hierarchies in order to allow greater control
and easier troubleshooting.
This is particularly helpful for colleges, universities and schools so that each of the connect to the big
network in some way.

Advantages of a Tree Topology


Point-to-point wiring for individual segments.
Supported by several hardware and software vendors.

Unit-1

All the computers have access to the larger and their immediate networks.
Disadvantages of a Tree Topology
Overall length of each segment is limited by the type of cabling used.
If the backbone line breaks, the entire segment goes down.
More difficult to configure and wire than other topologies.
Mesh Topology:
In this topology, each node is connected to every other node in the network.
Implementing the mesh topology is expensive and difficult.
In this type of network, each node may send message to destination through multiple paths.
While the data is travelling on the Mesh Network it is automatically configured to reach the destination by
taking the shortest route which means the least number of hops.

Advantage of Mesh Topology


No traffic problem as there are dedicated links.
It has multiple links, so if one route is blocked then other routes can be used for data communication.
Points to point links make fault identification easy.
Disadvantage of Mesh Topology
There is mesh of wiring which can be difficult to manage.
Installation is complex as each node is connected to every node.
Cabling cost is high
Hybrid Topology:
A combination of any two or more network topologies.
A hybrid topology always occurs when two different basic network topologies are connected.
It is a mixture of above mentioned topologies. Usually, a central computer is attached with subcontrollers which in turn participate in a variety of topologies

Unit-1

Advantages of a Hybrid Topology


It is extremely flexible.
It is very reliable.
Disadvantages of a Hybrid Topology
Expensive

3.2. Different Types of Networks:


Depending upon the geographical area covered by a network, it is classified as:

Local Area Network (LAN)


Metropolitan Area Network (MAN)
Wide Area Network (WAN)
Personal Area Network (PAN)

Local Area Network (LAN)

A LAN is a network that is used for communicating among computer devices, usually within an office
building or home.

LANs enable the sharing of resources such as files or hardware devices that may be needed by
multiple users.

Is limited in size, typically spanning a few hundred meters, and not more than a mile.

Is fast, with speeds from 10 Mbps to 10 Gbps.

Requires little wiring, typically a single cable connecting to each device.

Has lower cost compared to MANs or WANs

LANs can be either wired or wireless. Twisted pair, coaxial or fibre optic cable can be used in wired
LANs.

Every LAN uses a protocol a set of rules that governs how packets are configured and transmitted.

Nodes in a LAN are linked together with a certain topology.


These topologies include:

Unit-1

Bus
Ring
Star
LANs are capable of very high transmission rates (100s Mb/s to G b/s).

Advantages of LAN
Workstations can share peripheral devices like printers. This is cheaper than buying a printer for
every workstation.
User can save their work centrally on the networks file server. This means that they can retrieve their
work from any workstation on the network.
They dont need to go back to the same workstation all the time.
Users can communicate with each other and transfer data between workstations very easily.
One copy of each application package such as a word processor, spreadsheet etc. can be loaded onto
the file and shared by all users.
When a new version comes out, it only has to be loaded onto the server instead of onto every
workstation.

Disadvantages of LAN
Special security measures are needed to stop users from using programs and data that they should
not have access to;
Networks are difficult to set up and need to be maintained by skilled technicians.
If the file server develops a serious fault, all the users are affected, rather than just one user in the
case of a stand-alone machine.
Metropolitan Area Network (MAN):

A metropolitan area network (MAN) is a large computer network that usually spans a city or a
large campus.

A MAN is optimized for a larger geographical area than a LAN, ranging from several blocks of
buildings to entire cities.

A MAN might be owned and operated by a single organization, but it usually will be used by many
individuals and organizations.

A MAN often acts as a high speed network to allow sharing of regional resources.

A MAN typically covers an area of between 5 and 50 km diameter.

Unit-1

Examples of MAN: Telephone company network that provides a high speed DSL to customers and
cable TV network.

Advantages of MANs
The biggest advantage of MANs is the bandwidth (potential speed) of the connecting links. This means that
resources (such as databases and files) shared on the network can be accessed extremely quickly.
Disadvantages of MANs
The key disadvantage of MANs is the cost of the cutting-edge technology employed. Also, this equipment
generally has to be installed for the first time, as the copper traditionally used for the phone network is
generally considered to be too slow to be annexed for this purpose.

Wide Area Network (WAN):


WAN covers a large geographic area such as country, continent or even whole of the world.
A WAN is two or more LANs connected together. The LANs can be many miles apart.
To cover great distances, WANs may transmit data over leased high-speed phone lines or wireless links
such as satellites.
Multiple LANs can be connected together using devices such as bridges, routers, or gateways, which
enable them to share data.
The world's most popular WAN is the Internet.

Unit-1

Advantages of WAN:

Messages can be sent very quickly to anyone else on the network. These messages can have pictures,
sounds, or data included with them (called attachments).
Expensive things (such as printers or phone lines to the internet) can be shared by all the computers
on the network without having to buy a different peripheral for each computer.
Everyone on the network can use the same data. This avoids problems where some users may have
older information than others.
Share information/files over a larger area

Disadvantages of WAN

Setting up a network can be an expensive and complicated experience. The bigger the network the
more expensive it is.
Security is a real issue when many different people have the ability to use information from other
computers. Protection against hackers and viruses adds more complexity and expense.
Once set up, maintaining a network is a full-time job which requires network supervisors and
technicians to be employed.
Information may not meet local needs or interests.
Vulnerable to hackers or other outside threats

Personal Area Network (PAN):


A PAN is a network that is used for communicating among computers and computer devices (including
telephones) in close proximity of around a few meters within a room. Generally cover a range of less
than 10 meters (about 30 feet).
It can be used for communicating between the devices themselves, or for connecting to a larger
network such as the internet.
PANs can be wired or wireless. USB and FireWire technologies often link together a wired PAN,
while wireless PANs typically use Bluetooth or sometimes infrared connections. Bluetooth PANs are
also sometimes called piconets.
A personal area network (PAN) is a computer network used for communication among computer
devices, including telephones and personal digital assistants, in proximity to an Individuals body.
These networks are used to transfer files including email and calendar appointments, digital photos and
music.

Unit-1

3.3. Network Configuration:


Broadly speaking, there are two types of network configuration, peer-to-peer networks and client/server
networks.
Peer-to-peer networks are more commonly implemented where less than ten computers are involved and
where strict security is not necessary. All computers have the same status, hence the term 'peer', and they
communicate with each other on an equal footing. Files, such as word processing or spreadsheet documents,
can be shared across the network and all the computers on the network can share devices, such as printers or
scanners, which are connected to any one computer.

Client/server networks are more suitable for larger networks. A central computer, or 'server', acts as the
storage location for files and applications shared on the network. Usually the server is a higher than average
performance computer. The server also controls the network access of the other computers which are
referred to as the 'client' computers. Typically, teachers and students in a school will use the client computers
for their work and only the network administrator (usually a designated staff member) will have access rights
to the server.

Unit-1

Fig: Client-Server networking

4. Networking Components:
Network Interface Card (NIC):
A network interface card (NIC) is a circuit board or card that is installed in a computer so that it can be
connected to a network.
Each computer in a network has a special expansion card, called a network interface card(NIC). The NIC
prepares (formats) and sends data, receives data, and controls data flow between the computer and the
network. On the transmit side, the NIC passes frames of data on to the physical layer, which transmits the
data to the physical link. On the receiver's side, the NIC processes bits received from the physical layer and
processes the message based on its contents.

Hub:
Hub is a device that splits a network connection into multiple computers. It is like a distribution
center. When a computer request information from a network or a specific computer, it sends the request to
the hub through a cable. The hub will receive the request and transmit it to the entire network (every
computer in the network including the originating computer). Most of the computers on the network will
ignore the request. The computer that the request is being sent to will accept the data packet and send out a
reply packet. The reply packet will then be sent to every computer by the hub.
One problem with hubs is that they often cause collisions between packets. As a result, data is lost in
transmission and must be re-sent.
SWITCH:
A network switch is a small hardware device that joins multiple computers together within one local
area network (LAN).
A switch is a telecommunication device that receives a message from any device connected to it and
then transmits the message only to the device for which the message was meant ( It dont broadcast the
received message to entire network). This makes the switch a more intelligent device than a hub (which
receives a message and then transmits it to all the other devices on its network).

Unit-1

Switches appear nearly identical to hubs, but a switch generally contains more intelligence (and a slightly
higher price tag) than a hub.
Unlike hubs, network switches are capable of inspecting data packets as they are received,
determining the source and destination device of each packet, and forwarding them appropriately.
Unlike hubs, switches can limit the traffic to and from each port so that each device connected to the
switch has a sufficient amount of bandwidth. You can think of a switch as a "smart hub." Switches are more
advanced than hubs and less capable than routers.

ROUTER :
A router is a device that joins two different networks together. A router is a device that forwards
data packets between computer networks
A router is connected to two or more data lines from different networks. When a data packet comes in
one of the lines, the router reads the address information in the packet to determine its ultimate destination.
Then, using information in its routing table, it directs the packet to the next network on its journey. Routers
perform the "traffic directing" functions on the Internet. A data packet is typically forwarded from one router
to another through the networks that constitute the internetwork until it reaches its destination.
MODEM :
A modem, short for modulator/demodulator, is a device that converts the digital signals generated by a
computer into analog signals that can travel over conventional phone lines. The modem at the receiving end
converts the analog signal back into a digital form that the computer can understand. This is used to connect
the Internet.
A modem is a device that allows you to connect to your Internet service provider and browse the
Internet. Because modems only provide one IP address each, the best way to use a high-speed modem is to
share its services among computers.

Unit-1

ETHERNET CABLE :
To set up a wired network, Ethernet cables are needed that allow the transmission of
data from one networked device to another. Category 5 (Cat 5) cable is one of the most
common types of Ethernet cable. When connecting computers to a network, one end of the
Cat 5 cable is plugged into the computers NIC and the other is plugged into the hub, switch,
or router.

REPEATERS :
A repeater is a network device that is used to regenerate signals (strength) that are weakened or distorted by
transmission over long distances and through areas with high levels of electromagnetic interference (EMI).
The purpose of a repeater is to extend the LAN segment beyond its physical limits (e.g. Ethernet is 500m for
10Base5).
It is a simple hardware device that moves all packets from one local area network segment to another. The
main purpose of a repeater is to extend the length of the network transmission medium beyond the normal
maximum cable lengths.
Unlike bridges and switches, repeaters do not have physical addresses on the network.
BRIDGES:
A bridge is used to join two network segments together; it allows computers on either segment to
access resources on the other. They can also be used to divide large networks into smaller segments. Bridges
have all the features of repeaters, but can have more nodes, and since the network is divided, there is fewer
computers competing for resources on each segment thus improving network performance.

Bridges can also connect networks that run at different speeds, different topologies, or different
protocols. But they cannot, join an Ethernet segment with a Token Ring segment, because these use different
networking standards. Bridges operate at both the Physical Layer and the MAC sublayer of the Data Link

Unit-1

layer. Bridges read the MAC header of each frame to determine on which side of the bridge the destination
device is located, the bridge then repeats the transmission to the segment where the device is located.

WAPs (Wireless Access Point):


A wireless network adapter card with a transceiver sometimes called an access point, broadcasts and receives
signals to and from the surrounding computers and passes back and forth between the wireless computers
and the cabled network.

Access points act as wireless hubs to link multiple wireless NICs into a single subnet. Access points also
have at least one fixed Ethernet port to allow the wireless network to be bridged to a traditional wired
Ethernet network.

5. Number Systems:
Human beings use decimal (base 10) and duodecimal (base 12) number systems for counting and
measurements (probably because we have 10 fingers and two big toes). Computers use binary (base 2)
number system, as they are made from binary digital components (known as transistors) operating in two
states - on and off. In computing, we also use hexadecimal (base 16) or octal (base 8) number systems, as a
compact form for represent binary numbers.
1. Decimal (Base 10) Number System
Decimal number system has ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9, called digits. It uses positional
notation. That is, the least-significant digit (right-most digit) is of the order of 10^0 (units or ones), the
second right-most digit is of the order of 10^1 (tens), the third right-most digit is of the order of 10^2
(hundreds), and so on. For example,
735 = 7102 + 3101 + 5100
We shall denote a decimal number with an optional suffix D if ambiguity arises.
2. Binary (Base 2) Number System
Binary number system has two symbols: 0 and 1, called bits. It is also a positional notation, for example,
10110B = 124 + 023 + 122 + 121 + 020

Unit-1

We shall denote a binary number with a suffix B. Some programming languages denote binary numbers with
prefix 0b (e.g., 0b1001000), or prefix b with the bits quoted (e.g., b'10001111').
A binary digit is called a bit. Eight bits is called a byte (why 8-bit unit? Probably because 8=23).
3. Hexadecimal (Base 16) Number System
Hexadecimal number system uses 16 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F, called hex
digits. It is a positional notation, for example,
A3EH = 1016^2 + 316^1 + 1416^0
We shall denote a hexadecimal number (in short, hex) with a suffix H. Some programming languages denote
hex numbers with prefix 0x (e.g., 0x1A3C5F), or prefix x with hex digit quoted (e.g., x'C3A4D98B').
Each hexadecimal digit is also called a hex digit. Most programming languages accept lowercase 'a' to
'f' as well as uppercase 'A' to 'F'.
4. Conversion from Hexadecimal to Binary
Replace each hex digit by the 4 equivalent bits, for examples,
A3C5H = 1010 0011 1100 0101B
102AH = 0001 0000 0010 1010B
5. Conversion from Binary to Hexadecimal
Starting from the right-most bit (least-significant bit), replace each group of 4 bits by the equivalent hex digit
(pad the left-most bits with zero if necessary), for examples,
1001001010B = 0010 0100 1010B = 24AH
10001011001011B = 0010 0010 1100 1011B = 22CBH
It is important to note that hexadecimal number provides a compact form or shorthand for representing
binary bits.
6. Conversion from Base r to Decimal (Base 10)
Given a n-digit base r number: (dn-1 dn-2 dn-3 ... d3 d2 d1 d0) (base r), the decimal
equivalent is given by:
dn-1 r(n-1) + dn-2 r(n-2) + ... + d1 r1 + d0 r0
7. Conversion from Decimal (Base 10) to Base r
Use repeated division/remainder. For example,
To convert 261D to hexadecimal:
261/16 quotient=16 remainder=5

Unit-1

16/16 quotient=1 remainder=0


1/16 quotient=0 remainder=1 (quotient=0 stop)
Hence, 261D = 105H
8. Exercises (Number Systems Conversion)
1. Convert the following decimal numbers into binary and hexadecimal numbers:
1. 108
2. 4848
3. 9000
2. Convert the following binary numbers into hexadecimal and decimal numbers:
1. 1000011000
2. 10000000
3. 101010101010
3. Convert the following hexadecimal numbers into binary and decimal numbers:
1. ABCDE
2. 1234
3. 80F
4. [TODO] more

INTRODUCTION ON BINARY:
Bits:
The smallest "unit" of data on a binary computer is a single bit. Since a single bit is capable of
representing only two different values (typically zero or one) you may get the impression that there are a
very small number of items you can represent with a single bit. Not true! There are an infinite number of
items you can represent with a single bit.
Nibbles:
A nibble is a collection of four bits.
It wouldn't be a particularly interesting data structure except for two items: BCD (binary coded decimal)
numbers and hexadecimal numbers. It takes four bits to represent a single BCD or hexadecimal digit.
With a nibble, we can represent up to 16 distinct values. In the case of hexadecimal numbers, the values 0, 1,
2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F are represented with four bits. BCD uses ten different digits (0, 1, 2,
3, 4, 5, 6, 7, 8, and 9) and requires four bits. In fact, any sixteen distinct values can be represented with a
nibble, but hexadecimal and BCD digits are the primary items we can represent with a single nibble.
Bytes:
Without question, the most important data structure used by the 80x86 microprocessor is the byte.
A byte consists of eight bits and is the smallest addressable datum (data item) on the 80x86
microprocessor. Main memory and I/O addresses on the 80x86 are all byte addresses. This means that the
smallest item that can be individually accessed by an 80x86 programs is an eight-bit value. To access

Unit-1

anything smaller requires that you read the byte containing the data and mask out the unwanted bits. The bits
in a byte are normally numbered from zero to seven using the convention shown below:

Bit 0 is the low order bit or least significant bit; Bit 7 is the high order bit or most significant bit of the
byte. We'll refer to all other bits by their number.
Note that a byte also contains exactly two nibbles:

Bits 0..3 comprise the low order nibble, bits 4.7 form the high order nibble. Since a byte contains
exactly two nibbles, byte values require two hexadecimal digits.
Since a byte contains eight bits, it can represent 28, or 256, different values. Generally, we'll use a byte to
represent numeric values in the range 0...255, signed numbers in the range -128...+127 (see "Signed and
Unsigned Numbers" ), ASCII/IBM character codes, and other special data types requiring no more than 256
different values. Many data types have fewer than 256 items so eight bits is usually sufficient.
Words:
A word is a group of 16 bits. We'll number the bits in a word starting from zero on up to fifteen. The bit
numbering appears below:

Like the byte, bit 0 is the low order bit and bit 15 is the high order bit. When referencing the other bits in a
word use their bit position number.
Notice that a word contains exactly two bytes. Bits 0 through 7 form the low order byte, bits 8 through 15
form the high order byte:

With 16 bits, you can represent 216 (65,536) different values. These could be the values in the range
0..65,535 (or, as is usually the case, -32,768..+32,767) or any other data type with no more than 65,536
values. The three major uses for words are integer values, offsets, and segment values.
Words can represent integer values in the range 0...65,535 or -32,76832,767. Unsigned numeric
values are represented by the binary value corresponding to the bits in the word. Signed numeric values use

Unit-1

the two's complement form for numeric values. Segment values, which are always 16 bits long, constitute
the paragraph address of a code, data, extra, or stack segment in memory.
Double Words:
A double word is exactly what its name implies, a pair of words. Therefore, a double word quantity is 32 bits
long as shown below:

Naturally, this double word can be divided into a high order word and a low order word, or four different
bytes, or eight different nibbles.
Double words can represent all kinds of different things. First and foremost on the list is a segmented
address. Another common item represented with a double word is a 32-bit integer value (which
allows unsigned numbers in the range 0...4,294,967,295 or signed numbers in the range
-2,147,483,648...2,147,483,647). 32-bit floating point values also fit into a double word. Most of
the time, we'll use double words to hold segmented addresses

6. BINARY REPRESENTATION ON INTEGERS:


Integers are whole numbers or fixed-point numbers with the radix point fixed after the leastsignificant bit. They are contrast to real numbers or floating-point numbers, where the position of the radix
point varies. It is important to take note that integers and floating-point numbers are treated differently in
computers. They have different representation and are processed differently (e.g., floating-point numbers are
processed in a so-called floating-point processor). Floating-point numbers will be discussed later.
Computers use a fixed number of bits to represent an integer. The commonly-used bit-lengths for integers are
8-bit, 16-bit, 32-bit or 64-bit.
There are two representation schemes for integers:
1. Unsigned Integers: can represent zero and positive integers.
2. Signed Integers: can represent zero, positive and negative integers. Three representation schemes
had been proposed for signed integers:
1. Sign-Magnitude representation
2. 1's Complement representation
3. 2's Complement representation
You, as the programmer, need to decide on the bit-length and representation scheme for your integers,
depending on your application's requirements. Suppose that you need a counter for counting a small quantity
from 0 up to 200, you might choose the 8-bit unsigned integer scheme as there is no negative numbers
involved.

1. Unsigned Integers :

Unit-1

Unsigned integers can represent zero and positive integers, but not negative integers.
The value of an unsigned integer is interpreted as "the magnitude of its underlying binary pattern".
Range: An unsigned integer containing n bits can have a value between 0 and 2n 1.
Example 1:
Suppose that n=8 and the binary pattern is 0100 0001B, the value of this unsigned integer is 120 +
126 = 65D.
Example 2:
Suppose that n=16 and the binary pattern is 0001 0000 0000 1000B, the value of this unsigned
integer is 123 + 1212 = 4104D.
Example 3:
Suppose that n=16 and the binary pattern is 0000 0000 0000 0000B, the value of this unsigned
integer is 0.
An n-bit pattern can represent 2n distinct integers. An n-bit unsigned integer can represent integers from 0 to
(2n)-1, as tabulated below:
N(decimal
number)
8
16
32
64

Minimum

Maximum

0
0
0
0

(28)-1 (=255)
(216)-1 (=65,535)
(232)-1 (=4,294,967,295) (9+ digits)
(264)-1 (=18,446,744,073,709,551,615) (19+ digits)

2. Signed Integers:
Signed integers can represent zero, positive integers, as well as negative integers. Three representation
schemes are available for signed integers:
1. Sign-Magnitude representation
2. 1's Complement representation
3. 2's Complement representation
In all the above three schemes, the most-significant bit (msb) is called the sign bit. The sign bit is used to
represent the sign of the integer - with 0 for positive integers and 1 for negative integers. The magnitude of
the integer, however, is interpreted differently in different schemes.

Unit-1

2.1. Signed Integers in Sign-Magnitude Representation


In sign-magnitude representation:

The most-significant bit (msb) is the sign bit, with value of 0 representing positive integer and 1
representing negative integer.
The remaining n-1 bits represent the magnitude (absolute value) of the integer. The absolute value of
the integer is interpreted as "the magnitude of the (n-1)-bit binary pattern".
The largest and smallest signed integer that can be represented by using Signed Magnitude method of
N bits is
(2(N 1) 1) to 2(N 1) 1

Example 1: Suppose that n=8 and the binary representation is 0 100 0001B.
Sign bit is 0 positive
Absolute value is 100 0001B = 65D
Hence, the integer is +65D
Example 2: Suppose that n=8 and the binary representation is 1 000 0001B.
Sign bit is 1 negative
Absolute value is 000 0001B = 1D
Hence, the integer is -1D
Example 3: Suppose that n=8 and the binary representation is 0 000 0000B.
Sign bit is 0 positive
Absolute value is 000 0000B = 0D
Hence, the integer is +0D
Example 4: Suppose that n=8 and the binary representation is 1 000 0000B.
Sign bit is 1 negative
Absolute value is 000 0000B = 0D
Hence, the integer is -0D

Unit-1

The drawbacks of sign-magnitude representation are:


1. There are two representations (0000 0000B and 1000 0000B) for the number zero, which could
lead to inefficiency and confusion.
Positive and negative integers need to be processed separately.
2.2. Signed Integers in 1's Complement Representation
In 1's complement representation:

Again, the most significant bit (msb) is the sign bit, with value of 0 representing positive integers and
1 representing negative integers.
The remaining n-1 bits represents the magnitude of the integer, as follows:
o For positive integers, the absolute value of the integer is equal to "the magnitude of the (n-1)bit binary pattern".
o For negative integers, the absolute value of the integer is equal to "the magnitude of the
complement (inverse) of the (n-1)-bit binary pattern" (hence called 1's complement).
The largest and smallest signed integer that can be represented by using Signed Magnitude method of
N bits is
2(N 1) 1 to 2(N 1) 1

Unit-1

Example 1: Suppose that n=8 and the binary representation 0 100 0001B.
Sign bit is 0 positive
Absolute value is 100 0001B = 65D
Hence, the integer is +65D
Example 2: Suppose that n=8 and the binary representation 1 000 0001B.
Sign bit is 1 negative
Absolute value is the complement of 000 0001B, i.e., 111 1110B = 126D
Hence, the integer is -126D
Example 3: Suppose that n=8 and the binary representation 0 000 0000B.
Sign bit is 0 positive
Absolute value is 000 0000B = 0D
Hence, the integer is +0D
Example 4: Suppose that n=8 and the binary representation 1 111 1111B.
Sign bit is 1 negative
Absolute value is the complement of 111 1111B, i.e., 000 0000B = 0D
Hence, the integer is -0D

Again, the drawbacks are:


1. There are two representations (0000 0000B and 1111 1111B) for zero.
2. The positive integers and negative integers need to be processed separately.

Unit-1

2.3 Signed Integers in 2's Complement Representation


In 2's complement representation:

Again, the most significant bit (msb) is the sign bit, with value of 0 representing positive integers and
1 representing negative integers.
The remaining n-1 bits represents the magnitude of the integer, as follows:
o For positive integers, the absolute value of the integer is equal to "the magnitude of the (n-1)bit binary pattern".
o For negative integers, the absolute value of the integer is equal to "the magnitude of the
complement of the (n-1)-bit binary pattern plus one" (hence called 2's complement).

If a signed integer has n bits, it can contain a number between

- 2n - 1 and + (2n - 1 - 1).

Advantage over Sign-Magnitude representation and 1's Complement representation are


1. There is only one representation for the number zero in 2's complement, instead of two
representations in sign-magnitude and 1's complement.
2. Positive and negative integers can be treated together in addition and subtraction. Subtraction can be
carried out using the "addition logic".
Example 1: Suppose that n=8 and the binary representation 0 100 0001B.
Sign bit is 0 positive
Absolute value is 100 0001B = 65D
Hence, the integer is +65D
Example 2: Suppose that n=8 and the binary representation 1 000 0001B.
Sign bit is 1 negative
Absolute value is the complement of 000 0001B plus 1, i.e., 111 1110B + 1B = 127D
Hence, the integer is -127D
Example 3: Suppose that n=8 and the binary representation 0 000 0000B.
Sign bit is 0 positive
Absolute value is 000 0000B = 0D
Hence, the integer is +0D
Example 4: Suppose that n=8 and the binary representation 1 111 1111B.
Sign bit is 1 negative
Absolute value is the complement of 111 1111B plus 1, i.e., 000 0000B + 1B = 1D
Hence, the integer is -1D

Unit-1

EXAMPLES:
Example 1: Addition of Two Positive Integers: Suppose that n=8, 65D + 5D = 70D
65D
5D

0100 0001B
0000 0101B (+
-------------0100 0110B 70D (OK)

Example 2: Subtraction is treated as Addition of a Positive and a Negative Integers: Suppose that n=8, 5D
- 5D = 65D + (-5D) = 60D

Unit-1

65D 0100 0001B


-5D 1111 1011B (+
-------------0011 1100B 60D (discard carry - OK)
Example 3: Addition of Two Negative Integers: Suppose that n=8, -65D - 5D = (-65D) + (-5D)
= -70D
-65D
-5D

1011 1111B
1111 1011B (+
-------------1011 1010B -70D (discard carry - OK)

Because of the fixed precision (i.e., fixed number of bits), an n-bit 2's complement signed integer has a
certain range. For example, for n=8, the range of 2's complement signed integers is -128 to +127. During
addition (and subtraction), it is important to check whether the result exceeds this range, in other words,
whether overflow or underflow has occurred.
Example 4: Overflow: Suppose that n=8, 127D + 2D = 129D (overflow - beyond the range)
127D
2D

0111 1111B
0000 0010B (+
------------1000 0001B -127D (wrong)

Example 5: Underflow: Suppose that n=8, -125D - 5D = -130D (underflow - below the range)
-125D
-5D

1000 0011B
1111 1011B (+
--------------0111 1110B +126D (wrong)

The following diagram explains how the 2's complement works. By re-arranging the number line, values
from -128 to +127 are represented contiguously by ignoring the carry bit.

Binary Arithmetic
Rules of Binary Addition

0
0
1
1

+
+
+
+

0
1
0
1

=
=
=
=

0
1
1
0,

and carry 1 to the next more significant bit

For example,
00011010 + 00001100 = 00100110
0
+ 0

0
0

1
0
0

1
1
0

1
1

0
1

1
0

0
0

carries
= 26(base 10)
= 12(base 10)

= 38(base 10)

Unit-1

00010011 + 00111110 = 01010001


0
+ 0

1
0
0

1
0
1

1
1
1

1
0
1

1
0
1

1
1

1
0

carries
= 19(base 10)
= 62(base 10)

= 81(base 10)

Note: The rules of binary addition (without carries) are the same as the truths of the XOR gate.

Rules of Binary Subtraction

0
0
1
1

0
1
0
1

=
=
=
=

0
1,
1
0

and borrow 1 from the next more significant bit

For example,
00100101 - 00010001 = 00010100
0
- 0

0
0

0
1 10
0 1

0
0

1
0

0
0

1
1

borrows
= 37(base 10)
= 17(base 10)

0 1

= 20(base 10)

0
- 0

0
0

0 10
1 1
0 1

1
0 10
0 1

1
1

1
0

borrows
= 51(base 10)
= 22(base 10)

0 1

1 1

= 29(base 10)

0
0

0
0

1
0

0
0

1
0

0
1

0
1

1
0

0
0
1

0
1
0

0
0
1

0
1
0

0
0
0

0
0
1

0
1

00110011 - 00010110 = 00011101

Rules of Binary Multiplication

0
0
1
1

x
x
x
x

0
1
0
1

=
=
=
=

0
0
0
1,

and no carry or borrow bits

For example,
00101001 00000110 = 11110110

0
0

=
=

41(base 10)
6(base 10)

Unit-1
0

246(base 10)

0
0

0
0

0
0

1
0

0
0

1
0

1
1

1
1

=
=

23(base 10)
3(base 10)

1
0
0

1
0
1

1
1
0

1
0
1

1
1
1

1
1

0
0

00010111 00000011 = 01000101

carries

69(base 10)

Note: The rules of binary multiplication are the same as the truths of the AND gate.
Another Method: Binary multiplication is the same as repeated binary addition; add the multicand to itself
the multiplier number of times.
For example,
00001000 00000011 = 00011000
0
0
+ 0

0
0
0

0
0
0

1
0
0
0

1
1
1

0
0
0

0
0
0

0
0
0

=
=
=

carries
8(base 10)
8(base 10)
8(base 10)

24(base 10)

Binary Division
Binary division is the repeated process of subtraction, just as in decimal division.
For example,
00101010 00000110 = 00000111
1

7(base 10)

=
=

42(base 10)
6(base 10)

1
1

0
1

0
1

1
0

1
1

1
1

borrows

0
0
0

10000111 00000101 = 00011011

27(base 10)

Unit-1
1

1
1

1
0

=
=

135(base 10)
5(base 10)

0
1
1

1
0

1
1

1
0

1
1

1
1

0
0

1
1
0

Notes
Binary Number System
System Digits: 0 and 1
Bit (short for binary digit): A single binary digit
LSB (least significant bit): The rightmost bit
MSB (most significant bit): The leftmost bit
Upper Byte (or nybble): The right-hand byte (or nybble) of a pair
Lower Byte (or nybble): The left-hand byte (or nybble) of a pair
Binary Equivalents
1 Nibble (or nibble) = 4 bits
1 Byte = 2 nibbles = 8 bits
1 Kilobyte (KB) = 1024 bytes
1 Megabyte (MB) = 1024 kilobytes = 1,048,576 bytes
1 Gigabyte (GB ) =1024 megabytes = 1,073,741,824 bytes
Logical Operations on Bits
There are four main logical operations we'll need to perform on hexadecimal and binary numbers: AND, OR,
XOR (exclusive-or), and NOT.
The logical AND operation is a dyadic operation (meaning it accepts exactly two operands). These operands
are single binary (base 2) bits. The AND operation is:
0 and 0 = 0
0 and 1 = 0
1 and 0 = 0
1 and 1 = 1
A compact way to represent the logical AND operation is with a truth table. A truth table takes the following
form:

Unit-1

AND Truth Table


AND
0 1
0

0 0

0 1

The logical AND operation is, "If the first operand is one and the second operand is one, the result is one;
otherwise the result is zero."
The logical OR operation is also a dyadic operation. Its definition is:
0 or 0 = 0
0 or 1 = 1
1 or 0 = 1
1 or 1 = 1
The truth table for the OR operation takes the following form:
OR Truth Table
OR
0 1
0

Colloquially, the logical OR operation is, "If the first operand or the second operand (or both) is one, the
result is one; otherwise the result is zero." This is also known as the inclusive-OR operation.
The logical XOR (exclusive-or) operation is also a dyadic operation. It is defined as follows:
0 xor 0 = 0
0 xor 1 = 1
1 xor 0 = 1
1 xor 1 = 0
The truth table for the XOR operation takes the following form:
XOR Truth Table
XOR
0 1
0

0 1

1 0

In English, the logical XOR operation is, "If the first operand or the second operand, but not both, is one, the
result is one; otherwise the result is zero." Note that the exclusive-or operation is closer to the English
meaning of the word "or" than is the logical OR operation.
If the first operand contains a zero, then the result is exactly the value of the second operand. This feature
lets you selectively invert bits in a bit string.
The logical NOT operation is a monadic operation (meaning it accepts only one operand). It is:

Unit-1

NOT 0 = 1
NOT 1 = 0
The truth table for the NOT operation takes the following form:
NOT Truth Table
NOT
0 1
1 0

Generations of Computer languages:


Programming languages are use to write application programs which are used by end users.. The
development of programming languages has improved considerably with the ease and ability of
programmers to write powerful applications programs that can solve any task in the world today.
Each computer programming language has its own distinctive grammars and syntax and its own
manner of expressing ideas. In principle most computational task could be accomplish by any of the
languages but the programs would look very different moreover, writing a program for a particular task
could be easier with some languages than the others. The various generations of computer programming
languages are discussed below
Programming languages fall in to three broad categories (Five Generations):
1. Machine languages
2. Assembly languages
3. Higher-level languages
1. First-generation programming language (1GL) Binary
The first generation computer language was machine language, all machines used machine code which
consists of 0s and 1s.
Machine language is a language which is interpreted and executed directly by the computer.
Machine language is highly efficient and allows direct control of each operation; however programmers had
to write computer programs using 0 and 1.
The main advantage of programming in 1GL is that the code can run very fast and very efficiently, precisely
because the instructions are executed directly by the CPU. One of the main disadvantages of programming in
a low level language is that when an error occurs, the code is not as easy to fix.

Introduced in the 1940s


Instructions/Data entered directly in binary
Memory must be manually moved around
Programs were difficult to write and debug
Programming process was tedious
Programs were error prone

Unit-1

Examples:
Architecture specific binary delivered on Switches, Patch Panels and/or Tape.
2. Second-generation programming language (2GL) Assembly
These were developed in the early 1950s with the ability to use acronyms to speed programming and coding
of programs. They were known generational languages were called assembly languages. They had the
capability to performs operation such like add, sum. Like machine languages, assembly languages were
designed for specific machine and microprocessor, this implies that the program cannot be move from one
computer architecture without writing the code which means learning another language where you are to
transfer the programs.

Introduced in the 1950s


Written by a programmer in an intermediate instruction language which is later compiled into binary
instructions
Specific to platform architecture
Designed to support logical structure, debugging
Defined by three language elements: Opcodes (CPU Instructions), Data Sections (Variable
Definitions) and Directive (Macros)

Examples:
Almost every CPU architecture has a companion assembly language. Most commonly in use today are
RISC, CISC and x86 as that is what our embedded systems and desktop computers use.
3. Third-generation programming language (3GL) Modern
Third generation languages are the primary languages used in general purpose programming today (high
level computer languages popularly known as 3rd generation language (3GLS)). They each vary quite widely
in terms of their particular abstractions and syntax. However, they all share great enhancements in logical
structure over assembly language.

Introduced in the 1950s(between 1956 and 1963)


Designed around ease of use for the programmer
Driven by desire for reduction in bugs, increases in code reuse
Based on natural language
Often designed with in mind

Examples: 3rd generation languages include the following


C, C++, C#, Java, Basic, FORTRAN, COBOL.
FORTRAN Formula Translation
FORTRAN was developed in 1956 to provide easier way for scientific and engineering application and these
were especially useful for processing Numeric data.
COBOL Common Business Oriented Languages

Unit-1

COBOL came into use in the early 1960. It was designed with business administration in mind for
processing large data types with alphanumeric characters which were mixture of alphabet and data and does
repetitive tasks like payroll. The other language was BASIC. These were the early computer programming
languages in the early history of computers, since then there has been improvement and this will be discuss
later.

4. Fourth-generation programming language Application Specific


A fourth generation language is designed with making problems in a specific domain simple to implement.
This has the advantage of greatly reducing development time cost. At the same time there is the disadvantage
of increasing developer learning cost.

Introduced in the 1970s, Term coined by


Driven by the need to enhance developer productivity
Further from the machine
Closer to the domain

Some examples: SQL, SAS, MATLAB's GUIDE, ColdFusion, CSS


5. Fifth-generation programming language Constraint Oriented
Many researchers speak of 5GL languages as constraint systems. The programmer inputs a set of logical
constraints, with no specified algorithm, and the AI-based compiler builds the program based on these
constraints.

Introduced in the 1990s


Constraint-based instead of algorithmic
Used for AI Research, Proof solving,
Not in common use

Some examples: Prolog, Mercury

Das könnte Ihnen auch gefallen