CS1401 INTERNET COMPUTING Two Marks Questions With Answers 2014

Anna University, Chennai




Odd Semester




1. What is the difference between node and host?

A node is any addressable device connected to a network whereas the host is a more specific

descriptor that refers to a networked general-purpose computer rather than a single purpose device (such as a printer).

2. What is the purpose of routers?

Router operates like electronic postal workers that evaluate and forward packets between


3. Define protocol.


4. Why are the protocols layered?

Layering protocols simplifies the task of communicating over the network and it allows for reuse

of layers that are not specific to a particular application.

5. Define encapsulation.


6. Define port.

A port is a logical channel to an application running on a host. ie., The applications running on

the host machines are uniquely identified by port numbers.

7. Define URI, URL, and URN.



Such as a file, newsgroup, CGI program or e-mail address by indicating the exact location on the internet.

3. URN (Uniform Resource Name): It is a method for referencing an object without declaring the full path to the object.

8. What is the difference between TCP and UDP?



Connection oriented transport protocol Sends data as a stream of bytes Guarantee of delivery

Connection less protocol

Datagram service

No guarantee of delivery.

9. Define IP Address?

Each host computer on the internet has a unique number and it is called as internet protocol


10.Define Web page, Web site &Web browser?

1.A Web page is a document created using HTML.

2.A Web site is a collection of related pages.web pages and sites can be stored on the hard drive of a

local computer or a web server.

3.A Web browser is a program that displays the web pages it retrieves.

11. Define HTML.

It is a simple page description language, which enables document creation for theweb.

12. What do you mean by well-known ports?


ports are referred to as we1l-known ports because the Internet Assigned Numbers Authority publicly documents the applications that use them.

13. What is meant by Name Resolution?

Name Resolution is the process of mapping a hostname to its corresponding IP Address.One way

to translate a hostname to an IP address is to look it up in a simple text file.The second way is the domain name service, which is a distributed database containing all

registered hostnames on the Internet and their IP addresses.

14. Define protocol tunneling.

Protocol tunneling is the process of encapsulating one protocol within another protocol that

operates on the same layer.

15. What are the components of HTTP URL?

The components are host, an optional port, path, filename, section and query string.

16. Define URL encoding.

URL encoding involves replacing all unsafe and nonprintable characters with a

percent sign (%) followed by two hexadecimal digits corresponding to the character’s ASCII


17. What does ICMP provide?

ICMP provides

1. Error messaging

2. Demand reply functions

18. Define IGMP.

It is Internet Group Management protocol. It provides

1. Broadcasting

2. Multicasting

19. List the goals of SGML.

I. To manage the flow of millions of pages.

2. For structuring information exchange

3. For modeling inter-document linkages

4. For managing information flows between departments and weapons systems

20. What are the necessities of using HTML forms?

1. Gathering user information

2. Conducting Surveys

3. Interactive services

21. What are the sequences of steps for each HTTP request from a client to the server?

1. Making the connection

2. Making a request

3. The response

4. Closing the connection

22. Define MIME.


multipart, multimedia data through Internet email.

23. List the predefined MIME content types.

1. Text

2. Multipart

3. Message

4. Image

5. Audio

6. Video

7. Model

8. Application

24. What is meant by loop back address?

A zone that enables the server to direct traffic to itself. The host number is almost


25. List down font characteristics permitted in style sheets.






26. What are Style Sheets?



color and alignment. Style sheets also provide broader formatting instructions by specifying values for quantities such as line spacing and left and right margins.

27. List down the ways of including style information in a document.

1.External Styles -Style information is read from a separate file that is specified in the

<LINK> tag


<STYLE> and </STYLE> tags.

3.Inline Styles -Style information is placed inside an HTML tag and applies to all content between that tag and it companion closing tag.

28. Define cascading.



29. What are the style precedence rules when using multiple approaches?






1. What is the role of server?

1. Manages application tasks

2. Handles storage

3. Handles security

4. Provides scalability

5. Handles accounting and distribution

2. Define CGI -Common Gateway Interface.

A specification for transferring information between a World Wide Web server and a CGI

program. ACGI program is any program designed to accept and return data that conforms to the CGI specification. The program could be written in. any programming language, including C, Perl, Java, or Visual Basic.

3. Write a note on Internet Information Server (IIS).

Microsoft’s Web server that runs on Windows NT platforms, In fact, IIS comes bundled with

Windows NT 4.0. Because IIS is tightly integrated with the operating system, it is relatively easy to administer. However, currently IIS is available only for the Windows NT platform, whereas Netscape’ s Web servers run on all major platforms, including Windows NT platform, OS/2 and UNIX.

4. What are ISAPI (Internet Server API) and NSAPI (Netscape Server API)

ISAPI (Internet Server API): An API for Microsoft’s IIS (Internet Information

Server) Web server. ISAPI enables programmers to develop Web-based applications that run much faster than conventional CGI programs because they’re more tightly integrated with the Web server. In addition to IIS, several Web servers from companies other than Microsoft support ISAPI. NSAPI -Netscape Server API: An API for Netscape’s Web servers.


5. What is API -Application Program Interface?


easier to develop a program by providing all the building blocks. A programmer puts the blocks together. Most operating environments, such as MS- Windows, provide an API so that programmers can write applications consistent with the operating environment.

6. What are Servlets?

A small program that runs on a server, the term usually refers to a Java applet that runs within a Web server environment. This is analogous to a Java applet that runs within a Web browser environment.Java servlets are becoming increasingly popular as an alternative to CGI programs. The biggest difference between the two is that a Java applet is persistent. This means that once it is started, it stays in memory and can fulfill multiple requests. In contrast, a CGI program disappears once it has fulfilled a request. The persistence of Java applets makes them faster because there’s no wasted time in setting up and tearing down the process.

7. What are Applets?

A program designed to be executed from within another application. Unlike an application,

applets cannot be executed directly from the operating system. With the growing popularity of OLE (object linking and embedding), applets are becoming more prevalent. A well-designed applet can be invoked from many different applications. Web browsers, who are often equipped with Java virtual machines, can interpret applets from Web servers. Because applets are small in files size, cross-platform compatible, and highly secure (can’t be used to access users' hard drives), they are ideal for small Internet applications accessible from a browser.

8. What do you mean by Server-side?



9. What is a protocol?


determines the following:

1.The type of error checking to be used

2.Data Compression method, if any

3.How the sending device will indicate that it has finished sending a message

4.How the receiving device will indicate that it has received a message

10. What is ActiveX?

A loosely defined set of technologies developed by Microsoft for sharing


11. Write a note on ActiveX controls.

A control using ActiveX technologies. An ActiveX control can be automatically



12.Explain about HTTP Connection.

It is a communication channel between web browser and web server. It begins on the

client side with the browser sending a request to the web server for a document. Request Header Fields are

1. From

2. Reference

3. If_modified_since

4. Pragma

5. User Agent

13. What is meant by Stateless Connection?

When a web server receives a HTTP request from a web browser it evaluates the request and

returns the requested document, if it exists, and then breaks the HTTP connection.This document is preceded by the response header, which has details about how to display the document that will be sent by the server. Each time a request is made to the server, it is as if there was no prior connection and each request can yield only a single document. This is known as Stateless Connection.

14. Write a note on Environment variables.

In CGI, the server prepares the environment variables before it launches the CGI script. These

represent the current state of the server that is asking for the information. The environment variables are not set from the command line but are created on the fly, and lasts

only until that particular script is finished. Each script gets its own unique set of variables and multiple scripts can be executed at once, each in its own environment.

15. What are STDIN and STDOUT?

These are mnemonics for standard input and standard output, two predefined stream / file

handles. Each process already inherits these two handles already open. From the script’s point of

view, STDIN is what comes from the browser via the server when the post method is

used, and the STDOUT is where it writes its output back to the browser. The script picks up the environment variables and reads STDIN as appropriate. It then does whatever it was designed to do and writes its output to STDOUT.

16. What are the two commonly used Request methods?

The request methods tell the script how it was invoked. Based on this information, the script

decides how to act. The request method is passed to the script using environment variable called

REQUEST- METHOD. The two most common request methods used are GET and POST.


GET is a request for data, the same method used for obtaining static documents. The GET

method sends request information as parameter tacked onto the end of the URL. These parameters are passed to the CGI program in the environment variable QUERY-STRING.

E.g.: If the script is called myprog.exe and is invoked from a link with the form

<A HREF="cgi-bin/myprog.exe? lname=blow&fname=joe"> The REQUEST_METHOD will be the string GET, and the QUERY_STRING will contain lname=blow &fname=joe.

A mandatory question mark separates the name of the script from the beginning of the QUERY_STRING. If a slash is used instead of the question mark; the server passes the information to script using the PATH_INFO variable instead of the QUERY_STRING variable. POST

POST operation occurs when the browser sends data from a fill-in form to the server. With

POST, the QUERY_STRING mayor may not be blank, depending on the server.The data from a POSTed query gets passed from the server to the script using STDIN. Because STDIN is a stream and the script needs to know how much valid data is waiting, the server also Supplies another variable, CONTENT_LENGTH, to indicate the size in bytes of the incoming "data. The format for POSTed data is Variable1=value1 & variable2=value2 &etc.

17. Explain about URL Encoding.

HTTP specification requires that the URL data should be encoded in such a way that it can be

used on almost any hardware and software platforms. Information specified in this way is called URL encoded. If parameters are passed as a part of query string or path information, they will take the form of ‘Name-Value’ pairs. variablel=valuel&variable2=value2& so on for each variable defined in the form.

18. List the advantages of CGI scripting?

I. CGI programs are relatively safe to run.

2. A CGI program can crash without damaging the server, since it only has limited access to the server.

3. Reduces the burden of server

a. Sends prepared messages / mails e customer reply

b. Capability to process forms and prepares output based on form input. c . Hit counts / Page counters.

19. Explain about Session tracking.

A session is basically a conversation between a browser and a server. All the above technologies can save information for the current session for a particular user visiting a site. The session is important, as H1TP is a stateless protocol.

20. Define scriptlets.


any web page. Scriptlets are created using HTML, scripting and Dynamic HTML. To include them in an HTML document use the <OBJECT> tag.

21. Define ASP.

Active Server Pages (ASP) is a server-side scripting technology that can be used to

create dynamic and interactive web applications.

22. What are the ASP objects?

1.Application -It manages your web application.

2.Session -It manages and tracks individual user sessions.

3.Server -It controls behavior of your web server

4.Response -It transmits information from the web server to web browser

5.Request -It retrieves information from the browser for processing at the server.

23. What is global.asa file?

The global.asa file is a Active Server Application file you can track and manage the

application and session events, variables and objects. When you start the application the server will load the global.asa file into memory.

24. Define response object and list its methods.

The response object transmits information from the web server to browser.

Methods are:








25. Define JSP.

Java Server Pages (JSP) are simple technology used to generate dynamic HTML on

the server side.

26. Define Directives.

Directives are JSP elements that provide global information about an entire JSP page.

27. Write down the various attributes for the page directives in JSP.

The page directive defines information that will be globally available for that Java

Server Page,

1. language

2. extends

3. import

5. buffer

6. contenttype

28. What is meant by firewall?

A firewall is a piece of network hardware that serves as a secure gateway between an internal

network and the Internet. It protects the internal network from unauthorized access or activity,

29. Write a note on proxy server.

A proxy server is a host that makes Internet request on behalf of other machines on the network,

Proxy servers are often used to cache frequently requested files or to monitor Internet use within a Corporation.

30. What is meant by Plug-in?



31. What do you mean by JDBC?

JDBC Part of the Java Development Kit which defines an application-programming

interface for Java for standard SQL access to databases from Java programs.

32. Define ODBC.

It is a standard for accessing different databse systems. There are interfaces for Visual


.33.Define SSI.

Server Side Includes (SSI) gives you a way to insert the content of another file into a file before the web server processes it.



1.How XML differ From HTML?



1.HTML only displays and focuses on how Xml

data looks

Describes and focuses on the data

2. HTML is all about displaying information

XML all about information

3. HTML is not extensible

XML is extensible

4.HTML tags are predefined user must not invent

his tags

XML tags are not predefined user must invent his


5. HTML tags are not case sensitive

XML tags are case sensitive

2.What is the use of XML?

· XML files are human readable.

· Widespread industry support exists for XML.

· Major relational database are now have the native capability to read and generate XML


3.What to you mean by DTD in XML?

In XML sender can use a DTD to create XMLdocuments.On the receiving end the server can compare an incoming XML document against the DTD and determine if the incoming XML data is valid with respect to the DTD.Ifnot,it can be return a message indicating an error in the incoming format.

4.What is the use of XML Namespace with example?

XML Namespace is a simple technology solution that allows elements and attribute name to be distinguished from the similarity named elements and attributes of other XML users.

It solves the problem of clashing names.


<?xml version=”1.0”?>

<Book xmlns=http://www.library.com>

<lib:Title> xml webservices and the data revolution</lib:Title>

<lib:Author>Frank p.coyle</iib:Author>


5.What is the usage of CSS?

A simple mechanism for adding style(such as fonts,colors, or spacing) to web documents. Multiple levels of CSS can be used to allow selective overriding of styles.

6. Define EDI?

It is the exchange of information in a standard format between computers without any human intermediary.

7. What is DOM?

DOM is a W3C supported application program interface(API) that provides a platform and languages neutral interface to allow developers to programmatically access and modify the content and structure document such as HTML or XML.

8, Define XML schema?

An XML schema defines the structure of an XML document.In other words,It describes the valid format of an xml dataset.

9. Define XHTML

· XHTML is an effort by the W3C to replace HTML with more flexible approach to displaying web content.

· It differs from HTML in that it is based on XML,not SGML.

10. What is XSLT?

XSLT is an XML-based language used to transform XML documents into other formats

such as HTML for Web display, WML for display on WAP devices.

11.what are the use of XLink,Xpath,Xquery

· Xlink-enadlebirectional web linking.

· Xpath used to navigate XML tree structure.

· Xquery brings database query processing to XML.

12.What is metadata?

· Metadata includes the indexing and organization required to retrieve library material such as book by author,title,or subject.

· Metadata:Information about information.


1.What is SOAP?


· SOAP is an XML-based protocol for exchanging information in a decentralized, distributed environment.

· SOAP defines XML envelope for delivering XML content across HTTP as well

as other protocols and specifies a set of rules for servers to follow when receiving a SOAP message.

2.Define XML-RPC?

XML-Remote Procedure Call is aprotocol for doing remote procedure calls over the web where the information about what procedure to call and what parameters to pass are encoded as XML in the body of an HTTP POST requests to a server.

3. What is meant by SOAP Fault?

· The SOAP Fault information item is used to carry error and status information within a

SOAP message.

· SOAP Fault MUST appear as a direct child of the SOAP body and MUST NOT appear more than once within a SOAP body.

4.What is meant by SOAP Actors?

· If the SOAP actor attribute is not present in a header, then the recipient of the message is considered the final destination.

· If the application is not the ultimate destination of the message, then it must remove all header elements intended for it before forwarding the message.

5. Define SOAP with attachments

A binding for a SOAP message that allows additional information to be transported with the message using HTTPs multi part messaging.DTDsstylesheets,and digital digest to be sent as auxiliary information with a single SOAP message.

6.Write about SOAP design Patterns.

Architectural design patterns capture the proven experience of software architectures in the form of architectural patterns, each with distant properties that address different architectural design patterns.

7.Write about SOAP message structure

The SOAP Envelop: the outermost element of a SOAP message. The envelope element is the root of the XML document that defines a SOAP message.

The SOAP Header: An optional,yet key element in architects a distributed systems around


The SOAP Body: An element that must appear in a SOAP message

8.What is SOAP message

· SOAP message have a common format that includes a SOAP envelop.an optional header and a body section that contains the message content.

· SOAP message defines one way data transmission from a sender to receiver.

9. What are the parts of SOAP

SOAP consists of three parts

1. Encoding rules that control XML tags that define a SOAP message and framework that describes message content.

2. Rules for exchanging application

3. Conversions for representing remote procedure calls and response.


1. Define web services

Web services is a set of protocols that builds on the global connectivity made possible by SOAP and the synergies of XML and HTTP.It is the important approach to software discovery and it is decentralized, loosely coupled.

2. What are the key technologies in web services

The three key technologies are




3. Define ebXML

· Electronic Business XML (ebXML) represents a global initiative to define process around which business can interact over the web.

· It includes multiple specifications it define standard ways of exchanging business messages, conducting trading relationships etc.

4. Define UDDI

UDDI- Universal Description Discovery and Integration.

A protocol for describing web services components. UDDI allows business to register with an internet directory so they can advertise their services and companies can find each other and carry out transactions over the web.

5. Define WSDL.

WSDL- Web Service Description Language

An XML description of both the service interface and the implementation details of how to connect to and user particular web service.

6. What is mean by firewall

A firewall is a piece of network hardware that serves as a secure gate way between an internal network and internet.

Its protect the internal network from unauthorized access or activity.

7. Write a note on proxy server

A proxy server is a host that makes internet request on behalf of other machines on the network, Proxy servers are often used to catch frequently requested files or tomonitor internet use within a corporation.


Anna University, Chennai



1. Explain about Static Members with examples.

2. Explain the methods available under String and String Buffer Class.

3. Explain Packages and Java Doc Comments in detail.

4. Explain about Arrays


1. Explain event handling with examples.

2. Explain about Model-View-Controller pattern .

3. Explain about adapter classes with examples.


1. Explain about Generic Classes and Methods

2. Explain exception hierarchy.


1. What is a thread? Explain its states and methods?

2. Explain thread properties.

3. Explain about Executors and Synchronizers.

4. Explain in detail about Synchronization.

3. Explain about Inheritance rules for generics.

4. Explain about Assertions and Logging.

CS2304-SYSTEM SOFTWARE Two Marks Questions With Answers 2014


Anna University, Chennai




16 Marks

1. Describe the architecture of SIC machine.

2. Describe SIC/EX machine architecture.

3. Discuss about any one of the RISC machine architecture.

4. Discuss about any one of the RISC machine architecture.

16 Marks

1. Explain the design of a loader.

2. Discuss about the absolute loader.

3. What is meant by automatic library search?

4. Explain about bootstrap loader.

clip_image008[4]5. Explain the functions of program linking in machine dependent loader.

16 Marks

1. Explain in detail about Macro processor algorithm and data structures.

2. Explain the following machine independent macro features.

a. Concatenation of macro parameters

b. Keyword macro parameters

3. Explain in detail about MASM macro processor.

4. Explain ANSI C macro processor.

5. Explain conditional macro expansion with different types of macro conditional statements.

6. i) Why should a macro processor generate unique labels and explain how unique labels are generated.

clip_image010[4]ii) Discuss in brief about the data structures used by a macro processor.

16 Marks

1. Explain the Editor structure with a neat diagram.

2. Write short notes on

a. Interactive debugging systems

b. Text editors

3. Write short notes on

a. User Interface Criteria

b. Features that a basic text editor should posses

4. Explain debugging functions and its capabilities.

5. i) How are user interfaces useful? Explain

ii) Discuss the nature of user interface for an interactive debugger.

6. Discuss in detail about Interactive debugging systems


Anna University, Chennai





1. Explain about Inheritance.

2. Explain about Polymorphism.

3. Explain about Object Cloning with examples.

4. Explain about Reflection with examples.


1. Explain event handling with examples.

2. Explain about Model-View-Controller pattern .

3. Explain about adapter classes with examples.


1. Explain about Generic Classes and Methods

2. Explain exception hierarchy.

3. Explain about Inheritance rules for generics.

4. Explain about Assertions and Logging.



2. Explain thread properties.

3. Explain about Executors and Synchronizers.

4. Explain in detail about Synchronization.

CS55- PROGRAMMING PARADIGMS Two Mark Questions With Answers 2014

Anna University, Chennai




2-MARK Questions and Answers



1) What is meant by Object Oriented Programming?


2) What is a Class?


3) What is an Object?


4) What is an Instance?


5) What are the core OOP’s concepts?

Abstraction, Encapsulation, Inheritance and Polymorphism are the core OOP’s


6) What is meant by abstraction?

Abstraction defines the essential characteristics of an object that distinguish it from all other of objects. Abstraction provides crisply-defined conceptual boundaries relative to the perspective of the viewer. Its the process of focussing on the essential characteristics of an object. Abstraction is one of the fundamental elements of the object model.

7) What is meant by Encapsulation?


8) What are Encapsulation, Inheritance and Polymorphism?



9) What are methods and how are they defined?



Access specifiers are keywords that determine the type of access to the member of a class. These keywords are for allowing privileges to parts of a program such as functions and variables. These are: public: Anything declared as public can be accessed from anywhere. private: Any thing declared as private can’t be seen outside of its class. protected: Any thing declared as protected can be accessed by classes in the same package and subclasses in the other package default modifier : Can be accessed only to classes in the same package.



12) Explain the usage of Java packages.


13) What is method overloading and method overriding?




15) What is a constructor? What is a destructor?


16) What is the difference between constructor and method?


17) What is Static member classes?






20) What is static variable and static method?

static variable is a class variable which value remains constant for the entire class static method is the one which can be called with the class itself and can hold only the staic variables

21) What is finalize() method?


22) What is the difference between String and String Buffer?


23) What is the difference between Array and vector?


24) What is a package?




26) Explain working of Java Virtual Machine (JVM)?

JVM is an abstract computing machine like any other real computing machine




1) What is meant by Inheritance?




3) What is the difference between superclass and subclass?


4) Differentiate between a Class and an Object?


5) What is meant by Binding?

Binding denotes association of a name with a class

6) What is meant by Polymorphism?


7) What is Dynamic Binding?


8) What is final modifier?



final Classes- A final class cannot have subclasses.


final Methods- A final method cannot be overridden by subclasses.

9) What is an Abstract Class?


10) What are inner class and anonymous class?


11) What is an Interface?


12) What is a base class?


13) What is reflection in java?


14) Define superclass and subclass?




16) What is reflection API? How are they implemented?




18) What is the difference between abstract class and interface?






20) What is interface and its use?




21) How is polymorphism acheived in java?






24) What are the methods provided by the object class?


· notify

· notifyAll

· wait (three versions)


· The class loader to define the proxy class

· An invocation handler to intercept and handle method calls

· A list of interfaces that the proxy instance implements

26) What is object cloning?






2) How would you create a button with rounded edges?









6) What is the difference between applications and applets?





7) Difference between Swing and Awt?




9) How are the elements of different layouts organized?







10) Why would you use SwingUtilities.invokeAndWait or SwingUtilities.invokeLater?




12) What is the difference between scrollbar and scrollpane?


Conatiner and handles its own events and perform its own scrolling.



14) What is meant by controls and what are different types of controls in AWT? Controls are components that allow a user to interact with your application and the AWT supports the following types of controls: Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, and Text Components. These controls are subclasses of Component.







18) What is the lifecycle of an applet?






21) What is source and listener?





23) How would you detect a keypress in a JComboBox?



24) What an I/O filter?


25) How can I create my own GUI components?




1) What is an exception?


2) What is error?


3) Which is superclass of Exception?


4) What are the advantages of using exception handling?



Grouping Error Types and Error Differentiation.

5) What are the types of Exceptions in Java




6) Why Errors are Not Checked?








10) What is the difference between exception and error?








14) What are the different ways to handle exceptions?

There are two ways to handle exceptions:



15) How to create custom exceptions?

By extending the Exception class or one of its subclasses. Example:

class MyException extends Exception {

public MyException() { super(); }



16) Can we have the try block without catch block?



17) What is the difference between swing and applet?


18) What is the use of assert keyword?




20) What is the difference between throw and throws clause?


21) What are the different ways to generate and Exception?

There are two different ways to generate an Exception.



2. Exceptions can be manually generated by your code.


22) Where does Exception stand in the Java tree hierarchy?

· java.lang.Object

· java.lang.Throwable

· java.lang.Exception

· java.lang.Error

23) What is StackOverflowError?


e.g. void swap(){



24) Explain the exception hierarchy in java.





1) Explain different way of using thread?


2) What are the different states of a thread ?


3) Why are there separate wait and sleep methods?




5) What is synchronization and why is it important?




7) What is the difference between process and thread?




9) How can we create a thread?








13) What is serialization?


14) What does the Serializable interface do?


15) When you will synchronize a piece of your code?




17) What is the difference between yielding and sleeping?


18) What is casting?





Throwable type.

20) A Thread is runnable, how does that work?


21) Can I implement my own start() method?




23) What is thread priority?




25) How would you implement a thread pool?


26) What is a thread group?


CS2304-SYSTEM SOFTWARE Two Marks Questions With Answers 2014

Anna University, Chennai






1. Define system software.

It consists of variety of programs that supports the operation of the computer. This software makes it possible for the user to focus on the other problems to be solved with out needing to know how the machine works internally.

Eg: operating system, assembler, loader.

2. Give some applications of OS.

-to make the computer easier to use

-to manage the resources in computer

-process management

-data and memory management

-to provide security to the user.

Operating system acts as an interface between the user and the system


3. Define compiler and interpreter.

Compiler is a set of program which converts the whole high level language program to machine language program.

Interpreter is a set of programs which converts high level language program to machine language program line by line.

4. Define loader.

Loader is a set of program that loads the machine language translated by the translator into the main memory and makes it ready for execution.

5. What is the need of MAR register.

MAR (memory address register) is used to store the address of the memory from which the data is to be read or to which the data is to be written.

6. Draw SS instruction format.

0 7 8 15 16 19 20 31 32 35 36 47

It is a 6 byte instruction used to move L+I bytes data fro the storage location 1 to the storage location2.

Storage location1 = D1+[B1] Storage location2 = D2+[B2] Eg: MOV 60,400(3),500(4)

Base relative addressing

PC relative addressing

aTarget address is calculated using the formula

Target address =

cement+ [B]

Here The target address is calculated using the formula

Target address = Displacement + [PC]

PC-program counter

B-base register

7. Give any two difference between base relative addressing and program counter relative addressing used in SIC/XE.


Displacement lies between 0 to 4095 Displacement lies between –2048 to 2047

8. Define indirect addressing.

In the case of immediate addressing the operand field gives the memory location.The word from the given address is fetched and it gives the address of the operand.

Eg:ADD R5, [600]

Here the second operand is given in indirect addressing mode.First the word in memory location 600 is fetched and which will give the address of the operand.

9. Define immediate addressing.

In this addressing mode the operand value is given directly.There is no need to refer memory.The immediate addressing is indicated by the prefix „#‟.

Eg: ADD #5

In this instruction one operand is in accumulator and the second operand is a immediate value the value 5 is directly added with the accumulator content and the result is stored in accumulator.

10. List out any two CISC and RISC.

machine. CISC –Power PC, Cray T3E

RISC – VAX,Pentium Pro architecture

11. Following is a memory configuration:

Address Value Register R

1 5 5

5 7

6 5

What is the result of the following statement?

ADD 6(immediate) to R (indirect)

clip_image002Here 6 is the immediate data and the next value is indirect data.ie the register contains the address of the operand. Here the address of the operand is 5 and its corresponding value is 7. 6

+ [R] = 6+ [5] = 6+ 7 =13



Register R









12. Following is a memory configuration:

What is the result of the following statement? SUB 4(direct) to R (direct)

Here one operand is in the address location 4(direct addressing) and the next operand is in the register(register direct).

The resultant value is 9 –6 =3.

13. What is the name of X and L register in SIC machine and also specify its use.


clip_image003Used for arithmetic operation.ie in the case of arithmetic operations one operand is in the accumulator,and other operand may be a immediate value,registre operand or memory content.The operation given in the instruction is performed and the result is stored in the accumulator register.

L-linkage register

It is used to store the return address in the case of jump to subroutine (JSUB) instructions.

14. What are the instruction formats used in SIC/XE architecture? Give any one format. Format 1 (1 byte), Format 2 (2 bytes), Format 3 (3 bytes) & Format 4(4 bytes) Are the different instructions used in SIC/XE architecture.

Format 2:








15. Consider the instructions in SIC/ XE programming.









What is the value assign to the symbol NEW.

In the line 10 the address is 1000 and the instruction is RESW 4.It reserves 4 word (3 x 4

=12) area for the symbol LENGTH.hence 12 is added to the LOCCTR.

Thus the value of the symbol NEW is 1000+12 =100C.

16. What is the difference between the instructions LDA # 3 and LDA THREE?

In the first instruction immediate addressing is used. Here the value 3 is directly loaded into the accumulator register.

In the second instruction the memory reference is used. Here the address (address assigned for the symbol THREE) is loaded into the accumulator register.

17. Differentiate trailing numeric and leading separate numeric.

The numeric format is used to represent numeric values with one digit per byte. In the numeric format if the sign appears in the last byte it is known as the trailing numeric. If the sign appears in a separate byte preceding the first digit then it is called as leading separate numeric.

18. What are the addressing modes used in VAX architecture?

Register direct, register deferred, auto increment and decrement, program counter relative, base

relative, index register mode and indirect addressing are the various addressing modes in VAX


19. How do you calculate the actual address in the case of register indirect with immediate index mode?

Here the target address is calculated using the formula

T.A =(register) + displacement.

20. Write the sequence of instructions to perform the operation BETA = ALPHA + 1 using

SIC instructions.













21. Write the sequence of instructions to perform the operation BETA = ALPHA+5 using SIC/XE instructions.



22. What is the use of TD instruction in SIC architecture?

The test device (TD) instruction tests whether the addressed device is ready to send or receive a byte of data.The condition code is set to indicate the result of this test. Setting of < means the device is ready to send or receive, and = means the device is not ready.


2 Marks

1. Define the basic functions of assembler.

*translating mnemonic operation codes to their machine language equivalents.

*Assigning machine addresses to symbolic labels used by the programmer.

2. What is meant by assembler directives. Give example.

These are the statements that are not translated into machine instructions,but they provide instructions to assembler itself.


3 .What is forward references?

It is a reference to a label that is defined later in a program.

Consider the statement

10 1000 STL RETADR

80 1036 RETADR RESW 1

The first instruction contains a forward reference RETADR.If we attempt to translate the program line by line,we will unable to process the statement in line 10 because we do not know the address that will be assigned to RETADR .The address is assigned later(in line 80) in the program.

4.What are the three different records used in object program?

The header record,text record and the end record are the three different records used in object program.

The header record contains the program name,starting address and length of the program. Text record contains the translated instructions and data of the program.

End record marks the end of the object program and specifies the address in the program where execution is to begin.

5.What is the need of SYMTAB(symbol table) in assembler?

The symbol table includes the name and value for each symbol in the source program,together with flags to indicate error conditions.Some times it may contains details about the data area. SYMTAB is usually organized as a hash table for efficiency of insertion and retrieval.

6. What is the need of OPTAB(operation code table) in assembler?

The operation code table contain the mnemonic operation code and its machine language equivalent. Some assemblers it may also contains information about instruction format and length.OPTAB is usually organized as a hash table,with mnemonic operation code as the key.

7.What are the symbol defining statements generally used in assemblers?

* „EQU‟-it allows the programmer to define symbols and specify their values directly.The general format is symbol EQU value

* „ORG‟-it is used to indirectly assign values to symbols.When this statement is encountered the assembler resets its location counter to the specified value.

The general format is ORG


In the above two statements value is a constant or an expression involving constants and previously defined symbols.

8.Define relocatable program.

An object program that contains the information necessary to perform required modification in the object code depends on the starting location of the program during load time is known as relocatable program.

9.Differentiate absolute expression and relative expression.

If the result of the expression is an absolute value (constant) then it is known as absolute expression.,


If the result of the expression is relative to the beginning of the program then it is known as relative expression.label on instructions and data areas and references to the location counter values are relative terms.


10. Write the steps required to translate the source program to object program.

· Convert mnemonic operation codes to their machine language equivalents. Convert symbolic operands to their equivalent machine addresses

· Build the machine instruction in the proper format.

· Convert the data constants specified in the source program into their internal machine representation

· Write the object program and assembly listing.

11 .What is the use of the variable LOCCTR(location counter) in assembler?

This variable is used to assign addresses to the symbols.LOCCTR is initialized to the beginning address specified in the START statement.Aftre each source statement is processed the length of the assembled instruction or data area to be generated is added to LOCCTR and hence whenever we reach a label in the source program the current value of LOCCTR gives the address associated with the label.

12. Define load and go assembler.

One pass assembler that generate their object code in memory for immediate execution is known as load and go assembler.Here no object programmer is written out and hence no need for loader.

13 .What are the two different types of jump statements used in MASM


Near jump

A near jump is a jump to a target in the same segment and it is assembled by using a current code segment CS.

Far jump

A far jump is a jump to a target in a different code segment and it is assembled by using different segment registers .

14.What are the use of base register table in AIX assembler?

A base register table is used to remember which of the general purpose registers are currently available as base registers and also the base addresses they contain.

.USING statement causes entry to the table and .DROP statement removes the corresponding table entry.

15. Differentiate the assembler directives RESW and RESB.

RESW –It reserves the indicated number of words for data area. Eg:

10 1003 THREE RESW 1

In this instruction one word area(3 bytes) is reserved for the symbol THREE. If the memory is byte addressable then the address assigned for the next symbol is 1006.

RESB –It reserves the indicated number of bytes for data area. Eg: 10 1008 INPUT RESB 1

In this instruction one byte area is reserved for the symbol INPUT .Hence the address assigned for the next symbol is 1009.

1 6.Define modification record and give its format

This record contains the information about the modification in the object code during program relocation.the general format is

Col 1 M

Col 2-7 starting location of the address field to be modified relative to the beginning of the program

Col 8-9 length of the address field to be modified in half bytes.

17.Write down the pass numbers(PASS 1/ PASS 2) of the following activities that occur in a two pass assembler:

a. Object code generation

b. Literals added to literal table c. Listing printed

d. Address location of local symbols


a. Object code generation - PASS 2

b. Literals added to literal table – PASS 1 c. Listing printed – PASS2

d. Address location of local symbols – PASS 1

18. What is meant by machine independent assembler features?

The assembler features that does not depends upon the machine architecture are known as

machine independent assembler features. Eg: program blocks,Literals.

19. How the register to register instructions are translated in assembler?

In the case of register to register instructions the operand field contains the register name.During the translation first the object code is converted into its corresponding machine language equivalent with the help of OPTAB.Then the SYMTAB is searched for the numeric equivalent of register and that value is inserted into the operand field.

Eg: 125 1036 RDREC CLEAR X B410

B4-macine equivalent of the opcode CLEAR

10-numeric equivalent of the register X.

20. What is meant by external references?

Assembler program can be divided into many sections known as control sections and each control section can be loaded and relocated independently of the others.If the instruction in one control section need to refer instruction or data in another control section .the assembler is unable to process these references in normal way.Such references between control are called external references.

21 .Define control section.

A control section is a part of the program that maintain its identity after assembly;each control section can be loaded and relocated independently of the others.

Control sections are most often used for subroutines.The major benefit of using control sections is to increase flexibility.

22.What is the difference between the assembler directive EXTREF and EXTDEF.

EXTDEF names external symbols that are defined in a particular control section

and may be used by other sections.

EXTREF names external symbols that are referred in a particular control section and defined in another control section.

23. Give the general format of define record.

This record gives information about external symbols that are defined in a particular control

section.The format is

Col 1 D

Col 2-7 name of external symbol defined in this control section Col 8-13 relative address of the symbol with in this control section Col 14-73 name and relative address for other external symbols.

24.Give the use of assembler directive CSECT and USE

CSECT - used to divide the program into many control sections

USE – used to divide the program in to many blocks called program blocks

25.What is the use of the assembler directive START.

The assembler directive START gives the name and starting address of the program.The format is PN START 1000

Here PN –name of the program

1000-starting address of the program.

16 Marks

1. Describe the structure of a single pass assembler.

2. Discuss the design aspects of a two pass assembler.

3. Describe the various stages of an assembly process and explain how they are organized in two pass assembler.

4. What is meant by program relocation? Explain.

5. What is conditional assembly? Explain with example.

6. Discuss the merits of multipass assembler.


2 Marks

1 .What are the basic functions of loaders.

Loading – brings the object program into memory for execution



2.Define absolute loader

The loader, which is used only for loading, is known as absolute loader. e.g. Bootstrap loader

3.What is meant by bootstrap loader?

This is a special type of absolute loader which loads the first program to be run by the computer. (usually an operating system)

4.What are relative (relocative) loaders?

Loaders that allow for program relocation are called relocating (relocative ) loaders.

5.What is the use of modification record?

Modification record is used for program relocation.Each modification record specifies the starting address and the length of the field whose value is to be altered and also describes the modification to be performed.

6.What are the 2 different techniques used forrelocation?

Modification record method and relocation bit method.

7.Relocation bit method

If the relocation bit corresponding to a word of object code is set to 1,the program‟s starting address is

to be added to this word when the program is relocated.

Bit value 0 indicates no modification is required.

8.Define bit mask

The relocation bits are gathered together following the length indicator in each text record and which is called as bit mask.For e.g. the bit mask FFC(1 11111111100) specifies that the first 10 words of object code are to be modified during relocation.

9.What is the need of ESTAB.

It is used to store the name and address of the each external symbol. It also indicates in which control section the symbol is defined.

10.What is the use of the variable PROGADDR.

It gives the beginning address in memory where the linked program is to be loaded.The starting address is obtained from the operating system.

11 .Write the two passes of a linking loader.

Pass 1: assigns address to all external symbols

Pass2: it performs actual loading, relocation and linking.

1 2.Define automatic library search.

In many linking loaders the subroutines called by the program being loaded are automatically fetched from the library, linked with the main program and loaded.This feature is referred to as automatic library search.

13. List the loader options INCLUDE &DELETE. The general format of INCLUDE is

INCLUDE program_name (library name).This command direct the loader to read the designated object

program from a library and treat it as the primary loader input. The general format of DELETE

command is DELETE Csect-name

It instructs the loader to delete the named control sections from the sets of programs loaded.

14.Give the functions of the linking loader.

The linking loader performs the process of linking and relocation. It includes the operation of automatic library search and the linked programs are directly loaded.

15. Give the difference between linking loader and linkage editors.into the memory.


The re

Time g loader editor

the pro location and linking is performed each It produces a linked version of a program and

Here t h

gram is loaded whichis written in a file for later execution e loading can be accomplished in a single Two passes are required

16..Define dynamic linking.

If the subroutine is loaded and linked to the program during its first call(run time),then it is called as dynamic loading or dynamic linking.

1 7.write the advantage of dynamic linking.

a) it has the ability to load the routine only when they are needed

b) The dynamic linking avoids the loading of entire library for each execution

18. What is meant by static executable and dynamic executable?

In static executable, all external symbols are bound and ready to run. In dynamic executables some symbols are bound at run time.

19. What is shared and private data?

The data divided among processing element is called shared data. If the data is not shared among processing elements then it is called private data.

20.Write the absolute loader algm.


Read Header record

Verify program name and length Read first text record

While record type != „E‟ do


Moved object code to specified location in memory Read next object program record


Jump to address specified in End record


2 Marks

1 .Define macro processor.

Macro processor is system software that replaces each macroinstruction with the corresponding

group of source language statements. This is also called as expanding of macros.

2. What do macro expansion statements mean?

These statements give the name of the macroinstruction being invoked and the arguments to be used in expanding the macros. These statements are also known as macro call.

3. What are the directives used in macro definition?

MACRO - it identifies the beginning of the macro definition

MEND - it marks the end of the macro definition

4.What are the data structures used in macro processor?

DEFTAB – the macro definitions are stored in a definition table ie it contains a macro prototype and the statements that make up the macro body.

clip_image009NAMTAB – it is used to store the macro names and it contains two pointers for each macro instruction which indicate the starting and end location of macro definition in DEFTAB.it also serves as an index to DEFTAB

ARGTAB – it is used to store the arguments during the expansion of macro invocations.

5.Define conditional macro expansion.

If the macro is expanded depends upon some conditions in macro definition (depending on the arguments supplied in the macro expansion) then it is called as conditional macro expansion.

6.What is the use of macro time variable?

Macro time variable can be used to store working values during the macro expansion. Any symbol that begins with the character & and then is not a macro instruction parameter is assumed to be a macro time variable.

7.What are the statements used for conditional macro expansion?

IF-ELSE-ENDIF statement

WHILE-ENDW statement

8.What is meant by positional parameters?

If the parameters and arguments were associated with each other according to their positions in the macro prototype and the macro invocation statement, then these parameters in macro definitions are called as positional parameters.

9.Consider the macro definition

#Define DISPLAY(EXPR) Printf(“EXPR = %d\n”,EXPR) Expand the macro instruction DISPLAY (ANS)

Ans.: Printf (“EXPR = %d\n”, ANS)

10.What are known as nested macro call?

The statement in which a macro calls on another macro,is called nested macro call. In the nested macro call, the call is done by outer macro and the macro called is the inner macro.

11. How the macro is processed using two passes? Pass 1: processing of definitions

Pass 2:actual-macro expansion.

12.Give the advantage of line by line processors.

-it avoids the extra pass over the source program during assembling

-it may use some of the utility that can be used by language translators so that can be loaded once.

13.What is meant by line by line processor

This macro processor reads the source program statements, process the statements and then the output lines are passed to the language translators as they are generated, instead of being written in an expanded file.

14. Give the advantages of general-purpose macroprocessors.

*The programmer does not need to learn about a macro facility for each compiler.

*Overall saving in software development cost and a maintenance cost

15.What is meant by general-purpose macro processors?

The macro processors that are not dependent on any particular programming language,but can be used with a variety of different languages are known as general purpose macro processors. Eg.The ELENA macro processor.

16. What are the important factors considered while designing a general purpose macroprocessors?


-grouping of statements t-okens

-syntax used for macro definitions

17.What is the symbol used to generate unique labels?

$ symbol is used in macro definition to generate unique symbols.Each macro expansion the $

symbol is replaced by $XX,where XX is the alpha numeric character.

1 8.How the nested macro calls are executed?

The execution of nested macro call follows the LIFO rule.In case of nested macro calls the expansion of the latest macro call is completed first.

19.Mention the tasks involved in macro expansion.

x identify the macro calls in the program

the values of formal parameters are identified


maintain the values of expansion time variables declared in a macro x

expansion time control flow is organized x

determining the values of sequencing symbols


expansion of a model statement is performed

20. How to design the pass structure of a macro assembler?

To design the structure of macro-assembler, the functions of macro preprocessor and the

conventional assembler are merged. After merging, the functions are structured into passes of the

macro assembler.


2 Marks

1 .Define interactive editor?

An interactive editor is a computer program that allows a user to create and revise a target document. The term document includes objects such as computer programs, text, equations, tables, diagrams, line art, and photographs any thing that one might find on a printed page.

2. What are the tasks performed in the editing process?

4 tasks

1. select the part of the target document to be viewed and manipulated.

2. Determine how to format this view on-line and how to display it.

3. Specify and execute operations that modify the target document.

4. Update the view appropriately.

3. What are the three categories of editor‟s devices?

1. Text device/ String devices

2. Button device/Choice devices

3. Locator device

4.What is the function performed in editing phase?

In the actual editing phase, the target document is created or altered with a set of operations such as insert, delete, replace, move and copy.

5.Define Locator device?

Locator devices are two-dimensional analog-to-digital converters that position a cursor symbol on the screen by observing the user‟s movement of the device. The most common such devices for editing applications are the mouse and the data tablet.

6.What is the function performed in voice input device?

Voice-input devices, which translate spoken words to their textual equivalents, may prove to be the text input devices of the future. Voice recognizers are currently available for command input on some systems.

7.What are called tokens?

The lexical analyzer tracks the source program one character at a time by making the source program into sequence of atomic units is called tokens.

8.Name some of typical tokens.

Identifiers, keywords, constants, operators and punctuation symbols such as commas and parentheses are typical tokens.

9. What is meant by lexeme?

The character that forms a token is said to be a lexeme.

1 0.Mention the main disadvantage of interpreter.

The main disadvantage of interpreter is that the execution time of interpreted program is slower than

that of a corresponding compiled object program.

11 .What is meant by code optimization?

The code optimization is designed to improve the intermediate code, which helps the object program to run faster and takes less space.

12. What is error handler?

The error handler is used to check if there is an error in the program. If any error, it should warn

the programmer by instructions to proceed from phase to phase.

13 .Name some of text editors.

-line editors

-stream editors

-screen editors

-word processors structure editors

14.What for debug monitors are used?

Debug monitors are used in obtaining information for localization of errors.

15 .Mention the features of word processors.

x moving text from one place to another

x merging of text

x Searching

x word replacement

1 6.What are the phases in performing editing process?

a. Traveling phase b. Filtering phase

c. Formatting phase d. Editing phase

17.Define traveling phase.

The phase specifies the region of interest. Traveling is achieved using operations such as next screenful, bottom, find pattern.

1 8.Filtering phase.

The selection of what is to be viewed and manipulated in given by filtering.

1 9.Editing phase

In this phase, the target document is altered with the set of operations such as insert, delete, replace, move and copy.

20.Define user interface?

User interface is one, which allows the user to communicate with the system in order to perform certain tasks. User interface is generally designed in a computer to make it easier to use.

21 .Define input device?

Input device is an electromechanical device, which accepts data from the outside world and translates them into a form, which the computer can interpret.

22.Define output devices

Output devices the user to view the elements being edited and the results of the editing operations.

23.Define editor structure.

The command language processor accepts input from the users input devices and analyzes the tokens and syntactic structure of the commands.

24.Define interactive debugging systems

An interactive debugging system provides programmers with facilities that aid in the testing and debugging of programs.

1. Debugging functions and capabilities

2. Relationship with other parts of the system

3. User interface criteria.

26. What are the basic types of computing environments used in editors functions? Editor‟s

function in three basic types of computing environments

i.Time sharing



27 .What are the methods in Interaction language of a text editor?

a. Typing –oriented or text command oriented method b. Function key interfaces

c. menu oriented method