WHAT IS A COMPUTER LANGUAGE A Computer language

  • Slides: 40
Download presentation

WHAT IS A COMPUTER LANGUAGE • A Computer language is the main medium of

WHAT IS A COMPUTER LANGUAGE • A Computer language is the main medium of communicating with a Computer systems and the most common are the programming languages. • Computer only understands binary numbers that is 0 and 1 • But the languages are developed for different types of work on a Computer. • A language consists of all the instructions to make a request to the system for doing a task. • From the first generation and now fourth generation of the Computers there were several programming languages used to communicate with the Computer.

TYPES OF COMPUTER LANGUAGES • There are mainly two types of computer languages :

TYPES OF COMPUTER LANGUAGES • There are mainly two types of computer languages : • Low Level Language • High Level Language

ABOUT LOW LEVEL LANGUAGE • Low level languages are the machine codes in which

ABOUT LOW LEVEL LANGUAGE • Low level languages are the machine codes in which the instructions are given in machine language in the form of 0 and 1 to a Computer system. • Low level language is so close to hardware. • There are various programs and applications written in low level languages that are directly executable without any interpretation or translation. • Low level language is also divided into two parts are Machine language and Assembly language.

MACHINE LANGUAGE • Machine Language is one of the low-level programming languages which is

MACHINE LANGUAGE • Machine Language is one of the low-level programming languages which is the first generation language developed for communicating with a Computer. • It is written in machine code which represents 0 and 1 binary digits inside the Computer string which makes it easy to understand perform the operations. • As we know a Computer system can recognize electric signals so here 0 stands for turning off electric pulse and 1 stands for turning on electric pulse. • It is very easy to understand by the Computer and also increases the processing speed.

ASSEMBLY LANGUAGE • Assembly Language is the second generation programming language that has almost

ASSEMBLY LANGUAGE • Assembly Language is the second generation programming language that has almost similar structure and set of commands as Machine language. • Instead of using numbers like in Machine languages here we use words or names in English forms and also symbols. The programs that have been written using words, names and symbols in assembly language are converted to machine language using an Assembler. • Because a Computer only understands machine code languages that’s why we need an Assembler that can convert the Assembly level language to Machine language so the Computer gets the instruction and responds quickly.

HIGH LEVEL LANGUAGE • The high level languages are the most used and also

HIGH LEVEL LANGUAGE • The high level languages are the most used and also more considered programming languages that helps a programmer to read, write and maintain. • It is also the third generation language that is used and also running till now by many programmers. They are less independent to a particular type of Computer and also require a translator that can convert the high level language to machine language. • The translator may be an interpreter and Compiler that helps to convert into binary code for a Computer to understand. • There is various high level programming languages like C, FORTRAN or Pascal that are less independent and also enables the programmer to write a program.

Language Translators • A translator or programming language processor is a computer program that

Language Translators • A translator or programming language processor is a computer program that performs the translation of a program written in a given programming language into a functionally equivalent program in another computer language (the target language), without losing the functional or logical structure of the original code

 • Translators The most general term for a software code converting tool is

• Translators The most general term for a software code converting tool is “translator. ” A translator, in software programming terms, is a generic term that could refer to a compiler, assembler, or interpreter; anything that converts higher level code into another high-level code (e. g. , Basic, C++, Fortran, Java) or lower-level (i. e. , a language that the processor can understand), such as assembly language or machine code.

 • Compilers convert high-level language code to machine (object) code in one session.

• Compilers convert high-level language code to machine (object) code in one session. • Compilers can take a while, because they have to translate high-level code to lower-level machine language all at once and then save the executable object code to memory. • A compiler creates machine code that runs on a processor with a specific Instruction Set Architecture (ISA), which is processordependent.

 • Interpreters Another way to get code to run on your processor is

• Interpreters Another way to get code to run on your processor is to use an interpreter, which is not the same as a compiler. • An interpreter translates code like a compiler but reads the code and immediately executes on that code, and therefore is initially faster than a compiler. • Thus, interpreters are often used in software development tools as debugging tools, as they can execute a single in of code at a time. • Compilers translate code all at once and the processor then executes upon the machine language that the compiler produced. • If changes are made to the code after compilation, the changed code will need to be compiled and added to the compiled code (or perhaps the entire program will need to be re-compiled. )

 • Assemblers An assembler translates a program written in assembly language into machine

• Assemblers An assembler translates a program written in assembly language into machine language

Features of a good Language • Simplicity : A good programming language must be

Features of a good Language • Simplicity : A good programming language must be simple and easy to learn and use. • Naturalness: - A good language should be natural for the application area, for which it has been designed. That is, it should provide appropriate operators, data structures, control structures, and a natural syntax to facilitate the users to code their problem easily and efficiently. • Abstraction: - Abstraction means the ability to define and then use complicated structures or operations in ways that allow many of the details to be ignored.

 • Efficiency : - Programs written in a good programming language are efficiently

• Efficiency : - Programs written in a good programming language are efficiently translated into machine code, are efficiently executed, and acquire as little space in the memory as possible. • Structured: - Structured means that the language should have necessary features to allow its users to write their programs based on the concepts of structured programming. This property of a moreover, it forces a programmer to look at a problem in a logical way, so that fewer errors are created while writing a program for the problem. • Compactness : - In a good programming language, programmers should be able to express intended operations concisely. A verbose language is generally not liked by programmers, because they need to write too much.

Von Neumann architecture

Von Neumann architecture

Von Neumann Architecture • Von Neumann architecture was first published by John von Neumann

Von Neumann Architecture • Von Neumann architecture was first published by John von Neumann in 1945. • His computer architecture design consists of a Control Unit, Arithmetic and Logic Unit (ALU), Memory Unit, Registers and Inputs/Outputs. • Von Neumann architecture is based on the stored -program computer concept, where instruction data and program data are stored in the same memory. This design is still used in most computers produced today.

Central Processing Unit (CPU) • The Central Processing Unit (CPU) is the electronic circuit

Central Processing Unit (CPU) • The Central Processing Unit (CPU) is the electronic circuit responsible for executing the instructions of a computer program. • It is sometimes referred to as the microprocessor or processor. • The CPU contains the ALU, CU and a variety of registers.

Registers are high speed storage areas in the CPU. All data must be stored

Registers are high speed storage areas in the CPU. All data must be stored in a register before it can be processed. Memory Address Register Holds the memory location of data that needs to be accessed Memory Data Register Holds data that is being transferred to or from memory Accumulator Where intermediate arithmetic and logic results are stored PC Program Counter Contains the address of the next instruction to be executed CIR Contains the current Current Instruction Register instruction during processing MAR MDR AC

Arithmetic and Logic Unit (ALU) • The ALU allows arithmetic (add, subtract etc) and

Arithmetic and Logic Unit (ALU) • The ALU allows arithmetic (add, subtract etc) and logic (AND, OR, NOT etc) operations to be carried out.

Control Unit (CU) • The control unit controls the operation of the computer’s ALU,

Control Unit (CU) • The control unit controls the operation of the computer’s ALU, memory and input/output devices, telling them how to respond to the program instructions it has just read and interpreted from the memory unit. The control unit also provides the timing and control signals required by other computer components.

Buses are the means by which data is transmitted from one part of a

Buses are the means by which data is transmitted from one part of a computer to another, connecting all major internal components to the CPU and memory. A standard CPU system bus is comprised of a control bus, data bus and address bus. Address Bus Carries the addresses of data (but not the data) between the processor and memory Data Bus Carries data between the processor, the memory unit and the input/output devices Carries control signals/commands from the CPU (and status signals from Control Bus other devices) in order to control and coordinate all the activities within the computer

Memory hierarchy

Memory hierarchy

distinguish clearly for: a. Decreasing cost per bit b. Increasing capacity c. Increasing access

distinguish clearly for: a. Decreasing cost per bit b. Increasing capacity c. Increasing access time d. Decreasing frequency of access

 • Internal register is for holding the temporary results and variables. Accessing data

• Internal register is for holding the temporary results and variables. Accessing data from these registers is the fastest way of accessing memory. • Cache is used by the CPU for memory which is being accessed over and over again. Instead of pulling it every time from the main memory, it is put in cache for fast access. It is also a smaller memory, however, larger than internal register.

 • 3) Main memory or RAM (Random Access Memory): It is a type

• 3) Main memory or RAM (Random Access Memory): It is a type of the computer memory and is a hardware component. It can be increased provided the operating system can handle it. • 4) Hard disk: A hard disk is a hardware component in a computer. Data is kept permanently in this memory. Memory from hard disk is not directly accessed by the CPU, hence it is slower. As compared with RAM, hard disk is cheaper bit. • 5) Magnetic tape: Magnetic tape memory is usually used for backing up large data. When the system needs to access a tape, it is first mounted to access the data. When the data is accessed, it is then unmounted. The memory access time is slower in magnetic tape and it usually takes few minutes to access a tape.

Primary storage • RAM -Random-access memory is a form of computer data storage that

Primary storage • RAM -Random-access memory is a form of computer data storage that stores data and machine code currently being used. • The two widely used forms of modern RAM are – static RAM (SRAM) and – dynamic RAM (DRAM). > In SRAM, a bit of data is stored using the state of a six transistor memory cell. This form of RAM is more expensive to produce, but is generally faster and requires less dynamic power than DRAM. Ø In modern computers, SRAM is often used as cache memory for the CPU. Ø DRAM stores a bit of data using a transistor and capacitor pair, which together comprise a DRAM cell. The capacitor holds a high or low charge (1 or 0, respectively), and the transistor acts as a switch that lets the control circuitry on the chip read the capacitor's state of charge or change it. As this form of memory is less expensive to produce than static RAM, it is the predominant form of computer memory used in modern computers.

SRAM Cell (6 Transistors)

SRAM Cell (6 Transistors)

DRAM Cell (1 Transistor and one capacitor)

DRAM Cell (1 Transistor and one capacitor)

ROM • Read-only memory is a type of non-volatile Primary memory used in computers

ROM • Read-only memory is a type of non-volatile Primary memory used in computers and other electronic devices. Data stored in ROM can only be modified slowly, with difficulty, or not at all. • read-only memory refers to memory that is hard-wired

 • Classic mask-programmed ROM chips are integrated circuits that physically encode the data

• Classic mask-programmed ROM chips are integrated circuits that physically encode the data to be stored, and thus it is impossible to change their contents after fabrication. Other types of non-volatile solidstate memory permit some degree of modification: • Programmable read-only memory (PROM), or one-time programmable ROM (OTP), can be written to or programmed via a special device called a PROM programmer. Typically, this device uses high voltages to permanently destroy or create internal links (fuses or antifuses) within the chip. Consequently, a PROM can only be programmed once. • Erasable programmable read-only memory (EPROM) can be erased by exposure to strong ultraviolet light (typically for 10 minutes or longer), then rewritten with a process that again needs higher than usual voltage applied. Repeated exposure to UV light will eventually wear out an EPROM, but the endurance of most EPROM chips exceeds 1000 cycles of erasing and reprogramming. EPROM chip packages can often be identified by the prominent quartz "window" which allows UV light to enter. After programming, the window is typically covered with a label to prevent accidental erasure. Some EPROM chips are factory-erased before they are packaged, and include no window; these are effectively PROM.

 • Electrically erasable programmable read-only memory (EEPROM) is based on a similar semiconductor

• Electrically erasable programmable read-only memory (EEPROM) is based on a similar semiconductor structure to EPROM, but allows its entire contents (or selected banks) to be electrically erased, then rewritten electrically, so that they need not be removed from the computer (whether general-purpose or an embedded computer in a camera, MP 3 player, etc. ). Writing or flashing an EEPROM is much slower (milliseconds per bit) than reading from a ROM or writing to a RAM (nanoseconds in both cases). – Electrically alterable read-only memory (EAROM) is a type of EEPROM that can be modified one bit at a time. Writing is a very slow process and again needs higher voltage (usually around 12 V) than is used for read access. EAROMs are intended for applications that require infrequent and only partial rewriting. EAROM may be used as non-volatile storage for critical system setup information; in many applications, EAROM has been supplanted by CMOS RAM supplied by mains power and backed-up with a lithium battery. – Flash memory (or simply flash) is a modern type of EEPROM invented in 1984. Flash memory can be erased and rewritten faster than ordinary EEPROM, and newer designs feature very high endurance (exceeding 1, 000 cycles). Modern NAND flash makes efficient use of silicon chip area, resulting in individual ICs with a capacity as high as 32 GB as of 2007; this feature, along with its endurance and physical durability, has allowed NAND flash to replace magnetic in some applications (such as USB flash drives). Flash memory is sometimes called flash ROM or flash EEPROM when used as a replacement for older ROM types, but not in applications that take advantage of its ability to be modified quickly and frequently.

Basic Hardware components

Basic Hardware components

SMPS • SMPS stands for Switch-Mode-Power-Supply. They are used in many places in a

SMPS • SMPS stands for Switch-Mode-Power-Supply. They are used in many places in a computer. In a modern computer, there is a SMPS that takes rectified AC input from the wall, performs power factor correction and then converts the output into one or more lower voltage DC outputs. • SMPS stands for switch-mode power supply. Its job is to convert wall-voltage AC power to lower voltage DC power. Most computer chips in modern computers require power in the general neighborhood of 1. 23. 3 V, with some older devices requiring between 5 -12 V DC.

Mother Board • A motherboard (sometimes alternatively known as the mainboard, system board, baseboard,

Mother Board • A motherboard (sometimes alternatively known as the mainboard, system board, baseboard, planar board or logic board, or colloquially, a mobo) is the main printed circuit board (PCB) found in general purpose microcomputers and other expandable systems. • The Motherboard itself is a printed circuit board that allows the CPU, RAM, and all other computer hardware components to communicate with each other. • 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. • motherboard serves as the central circuit hub that connects all the peripherals and components of a computer. It also regulates the power received by the hard drive, graphics card, CPU and system memory from the power supply.

Parts of Motherboard and their functions • 1) Input/Output Ports • Generally, input and

Parts of Motherboard and their functions • 1) Input/Output Ports • Generally, input and output ports are placed at the very side (back) of computer chassis. In particular, the I/O ports is built to connect the monitor, speakers, a microphone, an Ethernet networking cable and multiple USB devices. At the same time, sometimes you can see the connection with the legacy devices. For example, parallel ports which work with the older printers. • 2) BIOS: • BIOS is the short form of “Basic Input Output System. ” BIOS is the components of Motherboard, and it is positioned as the Integrated Chip. Important to realize, BIOS contains all the information and settings of the motherboard, and you can update or modify the setting from the BIOS mode. – i) CMOS Battery – “Complementary Metal Oxide Semi-Conductor” is abbreviated as CMOS. It is a battery or cell which is featured with 3. 0 Volts lithium type cell. The work of CMOS Battery is – it helps to store or keep the information in the BIOS mode.

 • • • 3. CPU Socket CPU socket helps to install the processor

• • • 3. CPU Socket CPU socket helps to install the processor into the Motherboard. That means the CPU connects to the socket for connecting to the motherboard. 4. RAM (Memory) Slots For installing RAM modules, a motherboard may have more than one slots, and it is positioned near the CPU socket. In general, RAM is most needed parts of the motherboard and it refers to Random Access Memory. i) SIMM slots: SIMM is the short form of “Single In-line Memory Module. ” This types of slots can be found in older motherboards, up to 486 -boards. Important to realize, SIMM slots supports only 32 -bit bus. ii) DIMM slots: DIMM is the short form of “Double Inline Memory Module. ” It is the most updated, well-configured and latest RAM slots and it can run simultaneously with a 64 -bit bus. Another key point, the RAM slots which is used on the Laptop motherboard is known as SO-DIMM. 5. Expansion Card Slots When you need to add new components to the motherboard or if you want to update any parts of the motherboard, a motherboard’s expansion card slots allow you do that. An expansion card slots help to add external devices to display. For example, a video card needs to connect to the monitor to display the video or 3 D or rendering the graphics. Here, expansion card slots can do it. For this reason, it is positioned on the line of the back side of the motherboard. Storage Device Connectors A computer needs some other types of storage devices to store the data or performing efficiently including hard drives, optical drives, and floppy drives. As it needs to connect to the motherboard, here has the cable which is compatible with the motherboard to transfer the data. In the motherboard, you will find at least two storage device connectors to fulfill the needs of storage components on the computer.

 • • • Power Connectors A Motherboard needs the power to keep running

• • • Power Connectors A Motherboard needs the power to keep running and it gets the power from SMPS. There are connectors to keep the process going on. i) AT connector: It is one of the connectors which is found on the oldest motherboard and it has 2 number of 6 pin male connectors to make the supplying process. ii) ATX connector: These types of the connector is found on the latest forms of the motherboard. It consists 20 or 24 pin female connectors and it is considered as the latest power connectors. IDE connector IDE is the short form of “Integrated Drive Electronics” and it is used to connect the disk drives including floppy disk drives and HDD (Hard Disk Drives). Here you will find 40 -pin male connector that connects HDD. At the same time, the 34 -pin male connector that connects the FDD. SATA connector SATA is the abbreviation of “Serial Advanced Technology Attachment. ” Important to realize, it is the latest connectors with 7 -pin interface. It is used to connect the SATA hard disks or optical drives. It is faster and better than the IDE Connector. 10. Co-Processor One of vital parts or components of the motherboard is Co-Processors. It is used to perform mathematical calculations and computer graphics with the main processors.

Add on cards in computer • • • In computing, the expansion card, expansion

Add on cards in computer • • • In computing, the expansion card, expansion board, adaptercard or accessory card is a printed circuit board that can be inserted into an electrical connector, or expansion slot, on acomputer motherboard, backplane or riser card to addfunctionality to a computer system via the expansion b Types of expansion cards in a computer Interface card (ATA, Bluetooth, EIDE, Firewire, IDE, Parallel, RAID, SCSI, Serial, and USB) Modem. MPEG Decoder. Network Card. Sound Card. Video capture card. Video Card. us. An adapter is a physical device that allows one hardware or electronic interface to be adapted (accommodated without loss of function) to another hardware or electronic interface. In a computer, an adapter is often built into a card that can be inserted into a slot on the computer's motherboard.

Analog to Digital(ADC)

Analog to Digital(ADC)