Friday, 25 November 2016

Seven new programming languages to learn in 2016

These are the seven growing programming languages and you should learn for your carrier.

1. Google Go

Google’s Go Programming Language was created in 2009 by three Google employees, Robert Griesemer, Rob Pike, and Ken Thompson. The language’s success can be seen clearly by the fact that BBC, SoundCloud, Facebook and UK Government’s official website are some of the notable users of Go. It is faster, easier to learn and does the same job that C++ or Java has been doing for us. As the creators said, “Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language.

2. Swift

When a programming language is launched at the Apple’s WWDC, you can be sure that it has something that can deliver success and results. Swift was released in the Apple’s WWDC in 2014 and its exponential growth in just one year shows how capable and promising this language is. According to Apple, Swift brings the best of Python and Ruby together and adds modern programming fundamentals, to make it more effective and fun. If you’ve been using or were planning on learning Objective C to develop iOS apps, don’t bother learning it. Swift is the language you need to know moving forward. There will soon come a day when Objective C is used by nobody to develop apps.

3. Hack

Just like Swift, Hack is another programming language which has recently been launched and is a product of another tech giant, Facebook. In the past one year, Facebook has transformed almost their entire PHP codebase to Hack, and if a website with millions of users and unparalleled traffic  can rely on Hack, then the programming language must surely be here to stay.

4. Rust

The Rust Programming Language was launched in 2014 by Mozilla. It did not receive the immediate success that Hack and Go did, but in the last 6 months the number of Rust users in the world has escalated and it is expected to climb much higher. An upgrade to C and C++, Rust is becoming more beloved by programmers every day.

5. Julia

Delivering Hadoop style parallelism, Julia’s stock in the tech industry is rising. The Julia Language is highlighted as one that is destined to make a major impact in the future. Described as a high level, high performance, dynamic programming language for technical computing, Julia is making a niche of its own in the world of programming languages.

6. Scala

The Scala Programming Language has been on the market for a little longer than most of the other languages in this list and was probably a little slow to get off the blocks as compared to the other langua7 New Programming Languages To Learn in 2016
ges. However; this functional and highly scalable programming languages has gradually attracted attention and companies such as Twitter, LinkedIn and Intel are using the language in their system now.

7. Dart

Given that Google Go has garnered such unprecedented success, the other language from Google – Google Dart – has been in its shadows for the past 7-8 months. However, now that app development is gaining pace, people are realising how useful Dart can be in implementing high performance architecture and performing modern app development. Unveiled as a substitute for Javascript for browser apps, Dart is finally realising its true potential and is expected to continue its rise in the coming years.

Computer Software

Computer Software:

Software is a generic term for organized collections of computer data and instructions, often broken into two major categories: system software that provides the basic non-task-specific functions of the computer, and application software which is used by users to accomplish specific tasks.

System software is responsible for controlling, integrating, and managing the individual hardware components of a computer system so that other software and the users of the system see it as a functional unit without having to be concerned with the low-level details such as transferring data from memory to disk, or rendering text onto a display. Generally, system software consists of an operating system and some fundamental utilities such as disk formatters, file managers, display managers, text editors, user authentication (login) and management tools, and networking and device control software.
                          

Application software, on the other hand, is used to accomplish specific tasks other than just running the computer system. Application software may consist of a single program, such as an image viewer; a small collection of programs (often called a software package) that work closely together to accomplish a task, such as a spreadsheet or text processing system; a larger collection (often called a software suite) of related but independent programs and packages that have a common user interface or shared data format, such as Microsoft Office, which consists of closely integrated word processor, spreadsheet, database, etc.; or a software system, such as a database management system, which is a collection of fundamental programs that may provide some service to a variety of other independent applications.
                           

à Software is a general term for the various kinds of programs used to operate computers and related devices.
  System software : Includes the operating system and all the utilities that enable the computer to function.
  Application software : Includes programs that do real work for users. For example, word processors, spreadsheets, and database management systems fall under the category of applications software.

Assembler:
An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language.
Compiler:

A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.
The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code). If the compiled program can run on a computer whose CPU or operating system is different from the one on which the compiler runs, the compiler is known as a cross-compiler. A program that translates from a low level language to a higher level one is a decompiler. A program that translates between high-level languages is usually called a language translator, source to source translator, or language converter. A language rewriter is usually a program that translates the form of expressions without a change of language.


Loader:
1.      In a computer operating system , a loader is a component that locates a given program (which can be an application or, in some cases, part of the operating system itself) in offline storage (such as a hard disk ), loads it into main storage (in a personal computer, it's called random access memory ), and gives that program control of the computer (allows it to execute its instruction s).
A program that is loaded may itself contain components that are not initially loaded into main storage, but can be loaded if and when their logic is needed. In a multitasking operating system, a program that is sometimes called a dispatcher juggles the computer processor's time among different tasks and calls the loader when a program associated with a task is not already in main storage. (By program here, we mean a binary file that is the result of a programming language compilation, linkage editing, or some other program preparation process.)
2.      An operating system utility that copies programs from a storage device to main memory, where they can be executed. In addition to copying a program into main memory, the loader can also replace virtual addresses with physical addresses.
Most loaders are transparent, i.e., you cannot directly execute them, but the operating system uses them when necessary.

Linker:
1.      Also called link editor and binder, a linker is a program that combines object modules to form an executable program. Many programming languages allow you to write different pieces of code, called modules, separately. This simplifies the programming task because you can break a large program into small, more manageable pieces. Eventually, though, you need to put all the modules together. This is the job of the linker.
In addition to combining modules, a linker also replaces symbolic addresses with real addresses. Therefore, you may need to link a program even if it contains only one module.
2.      Link editors are commonly known as linkers. The compiler automatically invokes the linker as the last step in compiling a program. The linker inserts code (or maps in shared libraries) to resolve program library references, and/or combines object modules into an executable image suitable for loading into memory. On Unix-like systems, the linker is typically invoked with the ld command.
Static linking is the result of the linker copying all library routines used in the program into the executable image. This may require more disk space and memory than dynamic linking, but is both faster and more portable, since it does not require the presence of the library on the system where it is run.

Dynamic linking is accomplished by placing the name of a sharable library in the executable image. Actual linking with the library routines does not occur until the image is run, when both the executable and the library are placed in memory. An advantage of dynamic linking is that multiple programs can share a single copy of the library.
                                 

Computer Peripherals

Computer Peripherals:

A computer peripheral is any external device that provides input and output for the computer. 
For example, a keyboard and mouse are input peripherals, while a monitor and printer are output peripherals. Computer peripherals, or peripheral devices, are sometimes called "I/O devices" because they provide input and output for the computer. Some peripherals, such as external hard drives, provide both input and output for the computer.

                                                      1.Card Reader
                                                      2. Printers
                                                      3.Keyboard and Visual Display Units
                                                      4.Magnetic Disk
                                                      5. Magnetic Tape Drive
  

1.Card Reader
                         


            It is one of the most popular Input device, also Low cost and most convenient. Data captured in the form of rectangular holes punched on a crd can be fed into the computer through card reader. This medium in this case 19.3 centi meter in length, 9.5 width and 0.018 cm thickness. The card is divided into 80 columns  marked by the numbers 1 to 80 from left to right. The card is again divided into 12 rows numbered12, 11, 0,1,2,3,4,5,6,7,8,9 from top to bottom. Only one character  can be punched on one column. The digits are represented  by punching hust one hole in the corresponding row position. Alphabets are occupy two holes, The codes are  as  follows. A to I is 12,  respective row positions are 1 to 9,  For J to R combination is 11,  S to Z combination is 0. In the case of special characters a combination of two or three holes is used.
            Data can be captured  on card by punching through  a card punching Machine.The card reader only reads the card one after another, It reads sequential manner. The speed of card reader can vary depending on the model. Usually, the speed range between 300 to 1200 cards per minute.

2. Printers
Printer   is an important output device which can be used to get a printed copy of the processed text or result on paper. There are different types of printers that are designed for different types of applications. Depending on their speed and approach of printing, printers are classified as impact and non-impact printers. Impact printers use the familiar typewriter approach of hammering a typeface against the paper and inked ribbon. Dot-matrix printers are of this type. Non-impact printers do not hit or impact a ribbon to print. They use electro-static chemicals and ink-jet technologies. Laser printers and Ink-jet printers are of this type. This type of printers can produce color printing and elaborate graphics.

Serial Printer:
                                              

            The head moves along the line as the characters are printed. Depending up on the width of the stationery (25 to 35 cm), a serial printer can print a maximum of 74 to 132 characters in a line. The print head of a serial printer is bidirectional. (Moving left to right as well as right to left).Control operations can be performed by sending special character code to the printer.

Dot Matrix Printer:
                                            

A type of printer that produces characters  by striking pins against an ink ribbon to print closely spaced dots . Print head of a dot matrix printer consists of a column of 7 or 9 small needles. A character printed by a dot matrix  printer appears as a matrix pattern of dots.A character can formed to a matrix of 7 X 5 dots is also popular,(9 X 7 dots).Dot-matrix printers are relatively expensive and do not produce high-quality output. They can print to multi-page forms (that is, carbon copies), something laser and ink-jet printers cannot do.
Dot-matrix printers vary in two important characteristics:
·         speed: Given in characters per second (cps), the speed can vary from about  80 to 220 cps. Most dot-matrix printers offer different speeds depending on the quality of print desired.
·         print quality: The quality of this type of printing is poor because the character appear as patterns of dots.

Letter Quality Printer:
                                                   

                The matrix patterns are usually 18 X 36 or more. Most letter quality printer operate in one of the two modes. Draft mode(9 X 7) and letter quality mode (18 X 36). In letter quality mode, the speed is usually 50 to 100 cps. Higher speed is achieved when the printer is used in draft mode.

Daisy Wheel Printer:


                             

 
A daisy-wheel printer works on the same principle as a ball-head typewriter. The daisy wheel is a disk made of plastic or metal on which characters and numeric [96] characters stand out in the outer edge. To print a character, the printer rotates the disk until the desired letter is facing the paper. Then a hammer strikes the disk, forcing the character to hit an ink ribbon, leaving an impression of the character on the paper. Daisy-wheel printers cannot print graphics, and in general they are noisy and slow. Speed: printing from 25 to 60 characters per second.

3. Keyboard and Visual Display Units:


 This is the standard input device attached to all computers. The layout of keyboard is just like the traditional typewriter of the type QWERTY. It also contains some extra command keys and function keys. It contains a total of 101 to 104 keys. A typical keyboard used in a computer is shown in the above Fig. You have to press correct combination of keys to input data. The computer can recognize the electrical signals corresponding to the correct key combination and processing is done accordingly.
A device incorporating a cathode ray tube (CRT) display, a keyboard and a serial port. A VDU usually also includes its own display electronics which store the received data and convert it into electrical waveforms to drive the CRT. VDUs fall into two categories: dumb terminals and intelligent terminals (sometimes called "programmable terminals").  Early VDUs could only display characters in a single preset font, and these were confined to being layed out in a rectangular grid, reproducing the functionality of the paper-based teletypes they were designed to replace.  Later models added graphics facilities but were still driven via serial communications, typically with several VDUs attached to a single multi-user computer. This contrasts with the much faster single bitmap displays integrated into most modern single-user personal computers and workstations.  The term "Display Screen Equipment" (DSE) is used almost exclusively in connection with the health and safety issues concerning VDUs.
4.Magnetic Disk:
                                                 

Magnetic disks are most popular for direct access storage device. Each disk consists of a number of invisible concentric circles called tracks. Information is recorded on tracks of a disk surface in the form of tiny magnetic spots. The presence of a magnetic spot represents one bit and its absence represents zero bit. The information stored in a disk can be read many times without affecting the stored data. So the reading operation is non-destructive. But if you want to write a new data, then the existing data is erased from the disk and new data is recorded.
                          

5. Magnetic Tapes:
                                            

Magnetic tapes are used for large computers like mainframe computers where large volume of data is stored for a longer time. In PC also you can use tapes in the form of cassettes. The cost of storing data in tapes is inexpensive. Tapes consist of magnetic materials that store data permanently. It can be 12.5 mm to 25 mm wide plastic film-type and 500 meter to 1200 meter long which is coated with magnetic material. The deck is connected to the central processor and information is fed into or read from the tape through the processor. It similar to cassette tape recorder.

Advantages of Magnetic Tape:

  • Compact: A 10-inch diameter reel of tape is 2400 feet long and is able to hold 800, 1600 or 6250 characters in each inch of its length. The maximum capacity of such tape is 180 million characters. Thus data are stored much more compactly on tape.
  • Economical: The cost of storing characters is very less as compared to other storage devices.
  • Fast: Copying of data is easier and fast.
  • Long term Storage and Re-usability: Magnetic tapes can be used for long term storage and a tape can be used repeatedly without loss of data.

Thursday, 24 November 2016

MICROPROCESSOR & MICRO COMPUTER

MICROPROCESSOR:
A microprocessor consists of multiple independent function units. The memory interface fetches instructions from, and writes data to, external memory. The control unit issues one or more instructions to other function units. These units process the instructions in parallel to boost performance.
A microprocessor consists of multiple internal function units. A basic design has an arithmetic logic unit (ALU), a control unit, a memory interface, an interrupt or exception controller, and an internal cache. More sophisticated microprocessors might also contain extra units that assist in floating-point match calculations, program branching, or vector processing .

Example:
                      
MICRO COMPUTER:
A microcomputer is a computer with a microprocessor as its central processing unit. It includes a microprocessor, memory, and input/output (I/O) facilities. Such computers are physically small compared to mainframes and minicomputers. Many microcomputers (when equipped with a keyboard and screen for input and output) are also personal computers

The term microcomputer is generally synonymous with personal computer (PC), or a computer that depends on a microprocessor. Microcomputers are designed to be used by individuals, whether in the form of PCs, workstations or notebook computers. A microcomputer contains a central processing unit (CPU) on a microchip (the microprocessor), a memory system (typically read-only memory and random access memory), a bus system and I/O ports, typically housed in a motherboard.
           
       Example:
                                          


MEMORY SYSTEM


MEMORY  SYSTEM  IN A COMPUTER:


There are two kinds of computer memory: primary and secondary. Primary memory is accessible directly by the processing unit. RAM is an example of primary memory. As soon as the computer is switched off the contents of the primary memory is lost. You can store and retrieve data much faster with primary memory compared to secondary memory. Secondary memory such as floppy disks, magnetic disk, etc., is located outside the computer. Primary memory is more expensive than secondary memory. Because of this the size of primary memory is less than that of secondary memory
  1. Random Access Memory (RAM): The primary storage is referred to as random access memory (RAM) because it is possible to randomly select and use any location of the memory directly store and retrieve data. It takes same time to any address of the memory as the first address. It is also called read/write memory. The storage of data and instructions inside the primary storage is temporary. It disappears from RAM as soon as the power to the computer is switched off. The memories, which loose their content on failure of power supply, are known as volatile memories .So now we can say that RAM is volatile memory.
  2. Read Only Memory (ROM): There is another memory in computer, which is called Read Only Memory (ROM). Again it is the ICs inside the PC that form the ROM. The storage of program and data in the ROM is permanent. The ROM stores some standard processing programs supplied by the manufacturers to operate the personal computer. The ROM can only be read by the CPU but it cannot be changed. The basic input/output program is stored in the ROM that examines and initializes various equipment attached to the PC when the switch is made ON. The memories, which do not loose their content on failure of power supply, are known as non-volatile memories. ROM is non-volatile memory.
  3. PROM There is another type of primary memory in computer, which is called Programmable Read Only Memory (PROM). You know that it is not possible to modify or erase programs stored in ROM, but it is possible for you to store your program in PROM chip. Once the programmes are written it cannot be changed and remain intact even if power is switched off. Therefore programs or instructions written in PROM or ROM cannot be erased or changed.
  4. EPROM: This stands for Erasable Programmable Read Only Memory, which over come the problem of PROM & ROM. EPROM chip can be programmed time and again by erasing the information stored earlier in it. Information stored in EPROM exposing the chip for some time ultraviolet light and it erases chip is reprogrammed using a special programming facility. When the EPROM is in use information can only be read.
  5. Cache Memory: The speed of CPU is extremely high compared to the access time of main memory. Therefore the performance of CPU decreases due to the slow speed of main memory. To decrease the mismatch in operating speed, a small memory chip is attached between CPU and Main memory whose access time is very close to the processing speed of CPU. It is called CACHE memory. CACHE memories are accessed much faster than conventional RAM. It is used to store programs or data currently being executed or temporary data frequently used by the CPU. So each memory makes main memory to be faster and larger than it really is. It is also very expensive to have bigger size of cache memory and its size is normally kept small.
  6. Registers: The CPU processes data and instructions with high speed, there is also movement of data between various units of computer. It is necessary to transfer the processed data with high speed. So the computer uses a number of special memory units called registers. They are not part of the main memory but they store data or information temporarily and pass it on as directed by the control unit.
SECONDARY STORAGE:

In this type of memory the cost per bit of storage is low. However, the operating speed is slower than that of the primary storage. Huge volume of data are stored here on permanent basis and transferred to the primary storage as and when required. Most widely used secondary storage devices are magnetic tapes and magnetic disk

How Computer Works

How Computer Works




1. Input: This is the process of entering data and programs in to the computer system. You should know that computer is an electronic machine like any other machine which takes as inputs raw data and performs some processing giving out processed data. Therefore, the input unit takes data from us to the computer in an organized manner for processing.
2. Storage: The process of saving data and instructions permanently is known as storage. Data has to be fed into the system before the actual processing starts. It is because the processing speed of Central Processing Unit (CPU) is so fast that the data has to be provided to CPU with the same speed. Therefore the data is first stored in the storage unit for faster access and processing. This storage unit or the primary storage of the computer system is designed to do the above functionality. It provides space for storing data and instructions.
The storage unit performs the following major functions:
  • All data and instructions are stored here before and after processing.
  • Intermediate results of processing are also stored here.
3. Processing: The task of performing operations like arithmetic and logical operations is called processing. The Central Processing Unit (CPU) takes data and instructions from the storage unit and makes all sorts of calculations based on the instructions given and the type of data provided. It is then sent back to the storage unit.
4. Output: This is the process of producing results from the data for getting useful information. Similarly the output produced by the computer after processing must also be kept somewhere inside the computer before being given to you in human readable form. Again the output is also stored inside the computer for further processing.

5. Control: The manner how instructions are executed and the above operations are performed. Controlling of all operations like input, processing and output are performed by control unit. It takes care of step by step processing of all operations in side the computer. 

STACK Operations

//C++ Program to perform STACK Operations.


#include<iostream.h>
#include<conio.h>
class stack
{
           int s[10],n,i,size,t,ele,x;
public:
void create();
void push();
void pop();
void dis();
};
void stack::create()
{
cout<<"\n";
cout<<"Enter the size of the stack : ";
cin>>size;
t=0;
}
void stack::push()
{
if(t<size)
{
cout<<"\n";
cout<<"Enter the elemnet : ";
cin>>x;
s[t]=x;
t=t+1;
}
else
{
cout<<"\n";
cout<<"The stack is overflow : ";
}
}
void stack::pop()
{
if(size==0)
{
cout<<"\n";
cout<<"The stack is underflow : ";
}
else
{
ele=s[t];
t=t-1;
cout<<"\n";
cout<<"Deleted elemnet are : "<<s[t];
}
}
void stack::dis()
{
cout<<"\n";
cout<<"STACk ";
for(i=t-1;i>=0;i--)
if(i==t-1)
{
cout<<"\n \t |"<<s[i]<<"|<--- Top \n";
cout<<" \t ______ \t ";
}
else
{
cout<<"\n \t | " <<s[i]<<"| \n";
cout<<" \t ______ \t ";
}
}
void main()
{
int ch,a,t,b;
stack c;
clrscr();
   do
   {
cout<<"\n";
cout<<"\t STACK OPERATIONS \n";
cout<<"\t ~~~~~~~~~~~~~~~~ \n";
cout<<"* CREATE "<<endl;
cout<<"* PUSH "<<endl;
cout<<"* POP "<<endl;
cout<<"\n";
cout<<"Entter your choice : ";
cin>>ch;
switch(ch)
{
case 1:

            cout<<"\n";
            cout<<"\t 1.CREATE \n";
            cout<<"\t ~~~~~~~~ \n";
            cout<<"\n";
            cout<<"Empty stack is Created ";
            c.create ();
            break;
case 2:
            cout<<"\n";
            cout<<"\t 2.PUSH \n";
            cout<<"\t ~~~~~~~ \n";
            c.push();
            c.dis();
            break;
case 3:
            cout<<"\n";
            cout<<"\t 3.POP \n";
            cout<<"\t ~~~~~ \n";
            c.pop();
            c.dis();
            break;
}
cout<<"\n";
cout<<"Do u want continue Press 1 :";
cin>>b;
}while (b!=0);
getch();

}