Sei sulla pagina 1di 22

F-2,Block, Amity Campus Sec-125, Nodia (UP) India 201303 ASSIGNMENTS PROGRAM: Post Graduate Diploma in IT SEMESTER-I Subject

Name Study COUNTRY Permanent Enrollment Number (PEN) Roll Number Student Name INSTRUCTIONS a) Students are required to submit all three assignment sets. ASSIGNMENT Assignment A Assignment B Assignment C b) c) d) e) DETAILS Five Subjective Questions Three Subjective Questions + Case Study 45 Objective Questions MARKS 10 10 10 Introduction to IT and CS SOMALIA LC DIT02512012-2013014 Mohamed Abdullahi Khalaf

Total weightage given to these assignments is 30%. OR 30 Marks All assignments are to be completed as typed in word/pdf. All questions are required to be attempted. All the three assignments are to be completed by due dates (specified from time to time) and need to be submitted for evaluation by Amity University. f) The evaluated assignment marks will be made available within six weeks. Thereafter, these will be destroyed at the end of each semester. g) The students have to attached a scan signature in the form. Signature: _________________________________ Date: 12/12/2012 ( ) Tick mark in front of the assignments submitted Assignment A Assignment B Assignment C Page | 2

INTRODUCTION TO IT AND CS Assignment A Q: 1). Answer: In computer science, register transfer language (RTL) is a kind of intermediate representation (IR) that is very close to assembly language, such as that which is used in a compiler. Academic papers and textbooks also often use a form of RTL as an architecture-neutral assembly language. RTL is also the name of a specific IR used in the GNU Compiler Collection, and several other compilers, such as Zephyr. The symbolic notation used to describe the micro -operation transfer among registers is known as register transfer language. A register transfer language is a system for expressing in symbolic form the micro-operation sequences among the registers of digital module. RTL is a simple, human-oriented language to specify the operations, register communication and timing of the steps that take place within a CPU to carry out higher level (user programmable) instructions. Computer registers are designated by capital letters to denote the function of registers eg. The register that holds an address for the memory unit is usually called a memory address register and is designated by the name MAR. Other designation for registers are PC (for programme counter), IR (for instruction register), and R1 (for processor register). The individual flip flops is an n-bit register are 3 numbered in sequence from zero through n1, starting from zero is the right most position and increasing the number towards the left. Block diagram of register Explain register transfer language..

Copying the contents of one register to another is a register transfer A register transfer is indicated as R2 R1

Page | 3

Q: 2). Answer:

In this case the contents of register R2 are copied (loaded) into register R1 A simultaneous transfer of all bits from the source R1 to the destination register R2, during one clock pulse. Note that this is a non-destructive; i.e. the contents of R1 are not altered by copying (loading) them to R2 What are peripheral devices list them.

Peripheral Devices are computer devices, such as a CD-ROM drive or printer, that is not part of the essential computer, i.e., the memory and microprocessor. Peripheral devices can be external - such as a mouse, keyboard, printer, monitor, external Zip drive or scanner - or internal, such as a CD-ROM drive, CD-R drive or internal modem. Internal peripheral devices are often referred to as integrated peripherals. List of peripheral devices include: Keyboard Mouse Monitor Printer Scanner Microphone Speaker CD-ROM drive Joystick Modem Describe the circuit implementation of function xy+yz.

Q: 3). Answer:

Combinatorial Logic DeMorgans Law

Circuit

that

implements

the

function

xy+yz

(ab)=a+b (a+b)=ab Property for generating equivalent functions

Page | 4

y xy' + yz z

Allows conversion of AND function to an equivalent OR function and vice-versa It may allow the simplification of complex functions, that will allow a simpler design It is useful in generating the complement of a function. (xy + yz) = (xy)(yz) = (x + y)(y + z) = xy + xz + yy + yz (because yy=0) => (xy+yz) = xy + xz + yz x 0 0 0 0 1 1 1 1 Y 0 0 1 1 0 0 1 1 z 0 1 0 1 0 1 0 1 x'y' 1 1 0 0 0 0 0 0 x'z' 1 0 1 0 0 0 0 0 yz' 0 0 1 0 0 0 1 0 x'y + y'z + yz' 1 1 1 0 0 0 1 0

Q: 4). What is the difference between assembler, compiler and interpreter? Answer: The difference between assembler, compiler and interpreter is that: Compiler: is a program that translates English-like words of high-level language into the machine language of a computer. A compiler reads a given program called a Source Code and then, translates the program into the machine language, which is called an Object Code. Eg. When you run a program in C or high level language, it is done through compiler to convert them automatically into the machine level language. Page | 5

A computer translates an assembly language program from mnemonics to the binary machine code of a computer. It is used when we write a program in assembly level language and execution is performed, It converts the that assembly level language into computer understandable level language i.e. binary machine code. Compiler translates high-level instructions directly into machine language. Compiled programs generally run faster than interpreted programs. The compiler has a number of phases plus symbol table manager and an error handler. Input Source Program -> Lexical Analyzer -> Syntax Analyzer -> Symbol Table Manager Semantic Analyzer Error Handler -> Intermediate Code Generator -> Code Optimizer -> Code Generator -> Out Target Program Structure of a compiler Compilers bridge source programs in high-level languages with the underlying hardware. A compiler requires 1) determining the correctness of the syntax of programs, 2) generating correct and efficient object code, 3) run-time organization, and 4) formatting output according to assembler and/or linker conventions. A compiler consists of three main parts: the frontend, the middle-end, and the backend. The front end checks whether the program is correctly written in terms of the programming language syntax and semantics. Here legal and illegal programs are recognized. Errors are reported, if any, in a useful way. Type checking is also performed by collecting type information. The frontend then generates an intermediate representation or IR of the source code for processing by the middle-end. The middle end is where optimization takes place. Typical transformations for optimization are removal of useless or unreachable code, discovery and propagation of constant values, relocation of computation to a less frequently executed place (e.g., out of a loop), or specialization of computation based on the context. The middle-end generates another IR for the following backend. Most optimization efforts are focused on this part. The back end is responsible for translating the IR from the middle-end into assembly code. The target instruction(s) are chosen for each IR instruction. Register allocation assigns processor registers for the program variables where possible. The backend utilizes the hardware by figuring Page | 6

out how to keep parallel execution units busy, filling delay slots, and so on. Although most algorithms for optimization are in NP, heuristic techniques are well-developed. Interpreter: is a program that translates the English-like statements of a high-level language into the machine language of a computer. It translates high-level instructions into an intermediate form, which it then executes. An interpreter translates one statement at a time from a source code to an object code. Interpretation does not replace compilation completely. It only hides it from the user and makes it gradual. Even though an interpreter can itself be interpreted, a directly executed program is needed somewhere at the bottom of the stack (see machine language). Modern trends toward justin-time compilation and bytecode interpretation at times blur the traditional categorizations of compilers and interpreters. Other languages have features that are very easy to implement in an interpreter, but make writing a compiler much harder; for example, APL, SNOBOL4, and many scripting languages allow programs to construct arbitrary source code at runtime with regular string operations, and then execute that code by passing it to a special evaluation function. Assembler: Assembler is a program that translates programs from assembly language to machine language is called as Assembler. An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture. This representation is usually defined by the hardware manufacturer, and is based on mnemonics. Q: 5). Answer: A programming language is used by a human programmer to direct a computer to accomplish a specific set of steps which lead to a desired outcome. The figure at right illustrates several key points about programming languages. First, programming languages are built upon and relate directly to the underlying computer (hardware). In fact, they are designed to control the operation of the hardware. Page | 7 What are the different level of programming languages?

Second, these programming languages can be divided into three different levels. They are:

Machine Languages Assembly Languages and High-level Languages

Machine language is the "native tongue" of the computer, the language closest to the hardware itself. Each unique computer has a unique machine language. A machine language program is made up of a series of binary patterns (e.g., 01011100) which represent simple operations that can be accomplished by the computer (e.g., add two operands, move data to a memory location). Machine language programs are executable, meaning that they can be run directly. Programming in machine language requires memorization of the binary codes and can be difficult for the human programmer. Machine Language is the fundamental language of the computers processor. It is also called Low Level Language. All programs are converted into machine language before they can be executed. Consists of combination of 0s and 1s that represent high and low electrical voltage.

Assembly language represents an effort to make programming easier for the human. The machine language instructions are replaced with simple pneumonic abbreviations (e.g., ADD, MOV). Thus assembly languages are unique to a specific computer (machine). Prior to execution, an assembly language program requires translation to machine language. This translation is accomplished by a computer program known as an Assembler. Assemblers are written for each unique machine language. Assembly Language is low level language that is similar to machine language. Uses symbolic operation code to represent the machine operation code.

High-level languages are more English-like and, therefore, make it easier for programmers to "think" in the programming language. High-level languages also require translation to machine language before execution. This translation is accomplished by either a compiler or an interpreter. Compilers translate the entire source code program before execution. Interpreters translate source code programs one line at a time. Interpreters are more interactive than compilers.

Page | 8

High-level Language is Computer programming languages that is easier to learn. Uses English like statements. Examples are C ++, Visual Basic, Pascal, Fortran and

Page | 9

Assignment B Q: 1). Answer: The memory unit is an essential components in any digital computer since it is needed for strong progress and data. The hierarchical arrangement of storage in current computer architectures is called the memory hierarchy. It is designed to take advantage of memory locality in computer programs. Each level of the hierarchy is of higher speed and lower latency, and is of smaller size, than lower levels. Most modern CPUs are so fast that for most program workloads the locality of reference of memory accesses, and the efficiency of the caching and memory transfer between different levels of the hierarchy, is the practical limitation on processing speed. As a result, the CPU spends much of its time idling, waiting for memory I/O to complete. The memory hierarchy in most computers is as follows: Processor registers fastest possible access (usually 1 CPU cycle), only hundreds of bytes in size Level 1 (L1) cache often accessed in just a few cycles, usually tens of kilobytes . Level 2 (L2) cache higher latency than L1 by 2 to 10, often 512KB or more . Level 3 (L3) cache (optional) higher latency than L2, often multiple MB's Main memory (DRAM) may take hundreds of cycles, but can be multiple gigabytes . Disk storage hundreds of thousands of cycles latency, but very large. The term memory hierarchy is used in computer architecture when discussing performance issues in computer architectural design, algorithm predictions, and the lower level programming constructs such as involving locality of reference. A 'memory hierarchy' in computer storage distinguishes each level in the 'hierarchy' by response time. Since response time, complexity, and capacity are related, the levels may also be distinguished by the controlling technology. Explain memory hierarchy in brief.

Page | 10

The many trade-offs in designing for high performance will include the structure of the memory hierarchy, i.e. the size and technology of each component. So the various components can be viewed as forming a hierarchy of memories (m1,m2,...,mn) in which each member mi is in a sense subordinate to the next highest member m i-1 of the hierarchy. To limit waiting by higher levels, a lower level will respond by filling a buffer and then signaling to activate the transfer. There are four major storage levels. 1. 2. 3. 4. Internal Processor registers and cache. Main the system RAM and controller cards. On-line mass storage Secondary storage. Off-line bulk storage Tertiary and Off-line storage.

This is a most general memory hierarchy structuring. Many other structures are useful. For example, a paging algorithm may be considered as a level for virtual memory when designing a computer architecture. Most general purpose computer would run more efficiently if they were equipped with additional storage device beyond the capacity of main memory. The main memory unit that communicates directly with CPU is called the MAIN MEMORY . Devices that provide backup storage are called AUXILARY MEMORY. Most common auxiliary devices are magnetic disks and tapes they are used for strong system programs, large data files and other backup information. Only programs and data currently needed by the processor resides in main memory. All other informations are stored in auxiliary memory and transferred to the main memory when needed. The main memory hierarchy system consists of all storage devices employed in a computer system from the slow but high capacity auxiliary memory to a relatively faster main memory, to an even smaller and faster cache memory accessible to the high-speed processing logic. Memory Hierarchy is to obtain the highest possible access speed while minimizing the total cost of the memory system. Memory Hierarchy in computer system

Page | 11

A very high speed memory is called cache memory used to increase the speed of processing by making current programs and data available to the CPU at rapid rate. The cache memory is employed in the system to compensates the speed differential between main memory access time and processor logic. Q: 2). Answer: Parallel processing is a term used to denote a large class of techniques that are used to provide simultaneous data processing tasks for the purpose of increasing the computational speed of computer. The purpose of parallel processing is to speed up the computer processing capability and increased its throughput that is, the amount of processing can be accomplished during a interval of time the amount of hardware increases with parallel processing and with it the cost of system increases. Processor with multiple functional units 8.1 What do you understand by parallel processing?

Parallel processing at a higher level of complexity can be achieved by having a multiplicity of functional units that perform identical or different operation simultaneously. Parallel processing is established by distributing the data among the multiple functional units. . For example, the arithmetic, logic, and shift operations can be separated into three units and the operands diverted to each unit under the supervision of a control unit . The normal operation of a computer is to fetch instructions from memory and execute them in the processor. The sequence of instructions read from memory constitutes an instruction stream. The operations performed on the data in the processor constitutes Page | 12

a data stream. Parallel processing may occur in the instruction stream, in the data stream, or in both. Flynn's classification divides computers into four major groups as follows: 1. 2. 3. 4. Single instruction stream, single data stream (SISD) Single instruction stream, multiple data stream (SIMD) Multiple instruction stream, single data stream (MISD) Multiple instruction stream, multiple data stream (MIMD)

SISD represents the organization of single computer containing a control unit, a processor unit and memory unit. Instruction are executed sequentially and system may or may not have internal parallel processing capabilities. Parallel processing in this case may be achieved by means of multiple functional units or by pipeline processing. SIMD represents an organization that includes many processing units under the supervision of a common control unit .All processor receive the same instruction from the control unit but operate on the different items of data. The shared memory unit must contain multiple modules so that it can communicate with all the processors simultaneously. MISD structure is only of theoretical interest since no practical system has been constructed using this organization. MIMD organization refer to computer system capable of processing several programs at the same time. Most multiprocessor and multicomputer systems can be classified in this category. Flynn's classification depends on the distinction between the performance of the control unit and the data-processing unit. It emphasizes the behavior characteristics of the computer system rather than its operational and structural interconnections. One type of parallel processing that does not fit Flynn's classification is pipelining. Q: 3). What is array processor and what is the role of attached array processor? Answer: An array processor also called a vector processor is a microprocessor that executes one instruction at a time but on an array or table of data at the same time rather than on single data elements. It is a central processing unit (CPU) that implements an instruction set containing instructions that operate on one-dimensional arrays of data called vectors. This is in contrast to a scalar processor, whose instructions operate on single data items. Array processors can greatly improve performance on certain workloads, notably numerical simulation and similar tasks. Page | 13

An Array processor performs computations on large arrays of data. The term is used to refer two different types of processor . An attach array processor is an auxiliary processor attached to general purpose computer. It is intended to improve the performance of the host computer in specific numerical computation tasks. An SIMD processor is a processor that has single instruction multiple data organization. It manipulates vector instructions by means of multiple functional units responding to a common instruction . Although both types of array processors manipulate vector , their organization is different. Attached Array Processor An attached array processor is designed as a peripheral for conventional host computer, and its purpose is to enhance the performance of computer by providing Vector processing for complex applications. It achieves high performance by means of parallel processing with multiple functional units. It includes an arithmetic unit containing one or more pipelined floating point adders and multipliers. The array processor can be programmed by the user to accommodate variety of complex arithmetic problems. Attached array processor with host computer

SIMD Array Processor An SIMD array processor is a computer with multiple processing units operating in parallel. The processing units are synchronized to perform the same operation under the control of common control unit, thus providing a single instruction stream, multiple data stream organization. A general block diagrams of an array is shown in the below diagram. It contains a set of identical processing elements (PE),each having a local memory M. Each processor includes an ALU, a floating point arithmetic unit , and working registers. The master control unit controls the operations in the processor elements. The main memory is used for storage of the program. The Function of the master control unit is decode the instructions and determine how the instructions and determine how the instruction is to be executed. Scalar and program control instructions Page | 14

are directly executed within the master control units. Vector instructions are broad cast to all PEs simultaneously. Each PE uses operand stored in its local memory. Vector operands distributed to the local memories prior to parallel execution of the instruction.

There is no case study

Page | 15

Assignment C (Multiple Choice Question) Q: 1). a) b) c) d) Q: 2). a) b) c) d) Q: 3). a) b) c) d) Q: 4). a) b) c) d) The worlds fastest and most advanced computer. Main frames Computers Super Computers () Personal Computers Mini Computers Who is the father of computers. Blaise Pascal Charles Babbage () Konrad Zuse John Atanasoff Who invented Pascalin. Blaise Pascal () Charles Babbage Konrad Zuse John Atanasoff Who invented ABC . Blaise Pascal Charles Babbage Konrad Zuse John Atanasoff ()

Q: 5). ___________ earned the semiofficial title of "inventor of the modern computer" a) b) c) d) Q: 6). a) b) c) d) Blaise Pascal Charles Babbage Konrad Zuse () John Atanasoff MARK series of computers was designed by Konrad Zuse John Atanasoff Howard Aiken () Blaise Pascal Page | 16

Q: 7). The computers of ________ generation replaced vacuum tubes with transistors. a) b) c) d) Q: 8). a) b) c) d) 1st 2nd () 3rd 4th EDVAC stand for Electronic Discrete Variable Automatic Computer () Electronic Discrete Variable Automatic Calculator. Electric Discrete Variable Automatic Computer. Electric Dependent Variable Automatic Calculator.

Q: 9). _____________ type of computers recognizes data by counting discrete signal of (0 0r 1), they are high speed programmable; they compute values and stores results. a) b) c) d) Digital computer () Analog Computer Hybrid Computer Super Computer

Q: 10). In the decimal number system, there are _________ possible values. a) b) c) d) 2 10 () 8 16

Q: 11). In a positional notation system, the number base is called the __________. a) b) c) d) radix () radius remix base value

Q: 12). The decimal number 163 would be represented in BCD as follows. a) b) c) d) 0001 0110 0011 () 0001 0011 0110 0001 0011 0001 0001 0001 0110 Page | 17

Q: 13). When a fixed precision binary number is used to hold only positive values, it is said to be a) b) c) d) Q: 14). a) b) c) d) Q: 15). a) b) c) d) unsigned () Signed Positive Negitave The binary number system is ________ numbering system. positional notation () non-positional notation signed unsigned Convert 3710 to binary 100100 100101 () 101101 100110

Q: 16). Convert the binary number 01011011 to a hexadecimal number. a) b) c) d) B5 5B () 4B B6

Q: 17). Sometimes called __________, memory consists of one or more chips on the motherboard or some other circuit board in the computer. a) b) c) d) primary storage () auxiliary storage secondary storage permanent storage

Q: 18). Examples of storage media are all of the following except __________. a) b) c) d) floppy disks expansion cards () compact disks tape Page | 18

Q: 19). A __________, is a narrow recording band that forms a full circle on the surface of a disk. a) b) c) d) track () cluster shutter sector

Q: 20). A disks storage locations consist of pie-shaped sections, which break the tracks into small arcs called __________. a) b) c) d) backups clusters shutters sectors ()

Q: 21). Hard disks provide for __________ access times than floppy disks. a) b) c) d) lesser storage capacities and much slower greater storage capacities but much slower lesser storage capacities but much faster greater storage capacities and much faster ()

Q: 22). Below are the major structural components of CPU except: a) b) c) d) Control Unit ALU Registers () RAM

Q: 23). A hypothesis that states transistor densities in a single chip will double every 18 months a) b) c) d) Q: 24). a) b) c) d) Mores Law CPUs Law Moores Law () Transistors Law RISC stands for Reduced Instruction Set Computer () Redundant Instruction Set Computer Reduced Information Set Computer Reduced Instruction Set Chip Page | 19

Q: 25). a) b) c) d)

_______ is not an auxiliary memory. RAM () Hard Disk Tapes DVD

Q: 26). _____________ is most commonly used to store system-level programs that we want to have available to the computer at all times. a) b) c) d) ROM () RAM Hard Disk CD

Q: 27). The purpose of ___________ is to act as a buffer between the very limited, very high-speed CPU registers and the relatively slower and much larger main system memory. a) b) c) d) Q: 28). a) b) c) d) cache memory () RAM Virtual memory ROM When data are found in the cache, it is called a Cache miss Cache found Cache hit () Cache data

Q: 29). By placing some parts that should be in memory inside your hard-disk one can extend the memory capacity of a computer way beyond what is installed; this is called ___________. a) b) c) d) Q: 30). a) b) c) d) virtual memory () cache memory primary memory secondary memory __________ is not an input device. MICR OMR Touch Screen Plotter () Page | 20

Q: 31). a) b) c) d) Q: 32). a) b) c) d)

____________ is not an output device. Projector Printer Plotter Scanner () All are Variants of the Mouse except. Track ball Track pad integrated pointing device Game pad ()

Q: 33). ____________ is a device that can read text or illustrations and translate the information into a form the computer can use. a) b) c) d) Q: 34). a) b) c) d) Q: 35). a) b) c) d) Q: 36). a) b) c) d) Printer Plotter Scanner () Reader MICR stands for ________________. Magnetic Ink Character Recognition () Magnetic Ink Character Reader Mechanical Ink Character Recognition Mechanical Ink Character Reader ___________ is not an operating system. Unix Linux DOS Internet Explorer () COBOL is ___________ language. 1st 2nd 3rd () 4th

Page | 21

Q: 37). a) b) c) d)

____________ converts source code into object code. Compiler () Interpreter Translator Converter

Q: 38). ________________ is a software program that enables the computer hardware to communicate and operate with the computer software. a) b) c) d) Application Software Translators Languages Operating System ()

Q: 39). An Operating systems that is capable of allowing multiple software processes to be run at the same time is. a) b) c) d) Multiuser OS Multiprocessing Multitasking () Multithreading

Q: 40). A ____________ is a language that provides little or no abstraction from a computer's instruction set architecture. a) b) c) d) low-level programming language () High- level programming language Assembly level programming language Real programming language

Page | 22

Potrebbero piacerti anche