0% found this document useful (0 votes)
70 views6 pages

Computer Fundamental Solution

The document provides answers to multiple questions related to computer science topics. It includes: 1) DeMorgan's theorem for four variables and the corresponding truth table. 2) A flowchart describing the functions of a microprocessor such as fetching instructions, decoding, executing, and storing results. 3) Differences between hardware and software, including that hardware is physical while software is logical instructions.

Uploaded by

Nayeem Mahmood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views6 pages

Computer Fundamental Solution

The document provides answers to multiple questions related to computer science topics. It includes: 1) DeMorgan's theorem for four variables and the corresponding truth table. 2) A flowchart describing the functions of a microprocessor such as fetching instructions, decoding, executing, and storing results. 3) Differences between hardware and software, including that hardware is physical while software is logical instructions.

Uploaded by

Nayeem Mahmood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Solution to Previous Years’ Questions

CSE-1101
Final Examination
Q: Write DeMorgan's theorem for four variables & make truth table for them.
A:
DeMorgan’s theorems for four variables are:
= · · ·
= + + +
Truth Table:

+
·
·
A B C D A+B+C+D A·B·C·D +
·
+

0 0 0 0 1 1 1 1 0 0 1 1 1 1
0 0 0 1 1 1 1 0 1 0 0 1 0 1
0 0 1 0 1 1 0 1 1 0 0 1 0 1
0 0 1 1 1 1 0 0 1 0 0 1 0 1
0 1 0 0 1 0 1 1 1 0 0 1 0 1
0 1 0 1 1 0 1 0 1 0 0 1 0 1
0 1 1 0 1 0 0 1 1 0 0 1 0 1
0 1 1 1 1 0 0 0 1 0 0 1 0 1
1 0 0 0 0 1 1 1 1 0 0 1 0 1
1 0 0 1 0 1 1 0 1 0 0 1 0 1
1 0 1 0 0 1 0 1 1 0 0 1 0 1
1 0 1 1 0 1 0 0 1 0 0 1 0 1
1 1 0 0 0 0 1 1 1 0 0 1 0 1
1 1 0 1 0 0 1 0 1 0 0 1 0 1
1 1 1 0 0 0 0 1 1 0 0 1 0 1
1 1 1 1 0 0 0 0 1 1 0 0 0 0

Q: Describe the function of a microprocessor with the help of a flowchart.


A:
Functions of a microprocessor:
• At first, it fetches an instruction from the main memory.
• The instruction is then decoded to determine what action is required to be done.
• Based on instruction, it fetches data from main memory or I/O module if required.
• The instruction is then executed which may require performing arithmetic or logical
operations on data.
• In addition to execution, CPU also supervises and controls I/O devices. If there is any
request from I/O devices, called interrupt, the CPU suspends execution of the current
program and transfers control to an interrupt handling program.
• Finally, the result of an execution may require transfer of data to memory or an I/O
module.

1|Page
Nayeem Mahmood / 1AM / C161026
Begin

Awaiting for No
execution of
instruction

Yes

Fetch the instruction

Execute the instruction

Instruction No Store the


requiring
result
Service?

Yes

Transfer control to
Interrupt handling
program

Figure: Functions of a microprocessor

Q: Differentiate between Hardware and Software.


A:
Hardware Software
Physical parts of the computer are called A set of instructions given to the computer is
hardware called software
Hardware can be touched, seen and felt Software cannot be touched or felt
Hardware is constructed using physical Software is developed by writing instructions in
materials or components programming language
Computer is hardware, which operates under The operations of computer are controlled
the control of a software through software
If hardware is damaged, it is replaced with new If software is damaged or corrupted, its backup
one copy can be reinstalled
Hardware cannot be transferred from one place Software can be transferred from one lace to
to another electronically through network another electronically through network
User cannot make new duplicate copies of the User can make many new duplicate copies of the
hardware software
Hardware starts functioning once software is To deliver its set of instructions, Software is
loaded installed on hardware

2|Page
Nayeem Mahmood / 1AM / C161026
Hardware failure is random. Hardware does Software failure is systematic. Software does not
have increasing failure at the last stage have an increasing failure rate
Software does not wear out over time. However,
Hardware wears out over time
bugs are discovered in software as time passes
Hardware is physical in nature Software is logical in nature

Q: Basic components of database. Differentiate between Database & Database Management


System.
A:
Basic components of database are
1) File
2) Record
3) Field
4) Character

Differences between Database and Database Management System (DBMS):


Database is a collection of interrelated data stored in several tables, and linked through foreign
keys. Database Management System is the system that manages a collection of databases. The
database holds the records, fields and cells of data. The DBMS is the tool used to manipulate the
data inside the database.

Q: Advantages and disadvantages of Assembly and High Level Language.


A:
• Advantages of Assembly Language:
1) Assembly language programs are much easier to understand and use than machine
language program.
2) It is easier to locate and fix bugs, modify in assembly language than in machine
language.
3) Programmers need not keep track of storage locations of data and instructions while
writing program in assembly language.
4) A program’s location can be changed easily by changing the pseudo-instructions
suitably which is not possible easily in machine language programming.

• Disadvantages of Assembly Language:


1) Assembly language is machine dependent which means, an assembly language program
can be executed only on that computer in which the program is written.
2) Since assembly language is machine dependent, an assembly language programmer
must have a good knowledge of the characteristics and logical structure of the
computer.
3) Like machine language programs, writing assembly language program is also time-
consuming and difficult.

• Advantages of High Level Language:


1) High level languages are machine independent which means, a program written in a
high level language can be executed on many different computers.
2) High level languages are easier to learn and use because they are very similar to the
natural languages.
3) A programmer need not to be worried about how and where to store the instructions
and data.
4) It is easier to locate and fix bugs, to modify and to maintain.

3|Page
Nayeem Mahmood / 1AM / C161026
• Disadvantages of High Level Language:
1) A program written in a high level language has lower time and space efficiency than one
written in a machine or assembly language to do the same job.
2) High level languages are less flexible than assembly languages because they do not
normally have instructions or mechanism to control a computer’s CPU, memory and
registers.

Q: Differentiate between Data and Information.


A:
Data is raw, unorganized facts that need to be processed. Data can be something simple and
seemingly random and useless until it is organized. Data is useless unless it is processed. Data is an
unclear definition of words jumbled up to form one meaning of something. Data comes in figures,
dates and numbers and is not processed.
On the other hand, when data is processed, organized, structured or presented in a given context so
as to make it useful, it is called information. Data does not depend upon information but
information depends upon data.
For example, each student's test score is one piece of data. But the average score of a class or of the
entire school is information that can be derived from the given data.

Q: Differentiate between Software and Firmware.


A:
Software is the set of user programs running on a system that are designed to be updated often by
those users. Firmware is semi-permanent software running on a system that may or may not be
updated often, and usually require a higher level of skill or effort. Software is the most temporary
and malleable. Firmware is semi-permanent software that’s tied more directly to the hardware and
updated less often.

Q: What is Speech synthesizer? Write useful applications & functions of it.


A:
A speech synthesizer converts text information into spoken sentence. To produce speech, it
combines basic sound units called phonemes. From a given text information, it combines the
sequence of words into phonemes, amplifies it and produces the output through a speaker.

Speech synthesizers are still in their infancy because currently they can produce only limited
unique sounds with limited vocal inflections and phrasing. However, several applications, including
the following, use them:

1) For reading out text information to blind persons. For example, we can scan a recently
published book using a scanner, convert it into text using OCR software and then a speech
synthesizer can read it out to blind persons.
2) For allowing those persons who cannot speak, to communicate effectively.
3) For translation system that converts an entered text into spoken words in a selected
language.

Q: Describe role of I/O devices in a computer with diagram.


A:
To be useful, a computer system needs to communicate with its external environment. Input-output
devices (I/O devices) provide this capability to a computer system. They are also known as
peripheral devices because they surround a computer’s CPU and memory. Input devices enter data

4|Page
Nayeem Mahmood / 1AM / C161026
from outside world into primary storage, and output devices supply the results of processing from
primary storage to users.

Input data CPU &


Input Output
from external Results of processing
devices Memory devices
world Input data Processed in human acceptable form
coded in data in
internal form internal form

Figure: Illustrating the role of I/O devices

Q: What are peripheral devices? Can a device be used as both input & output device? If no,
explain. If yes, give an example.
A:
A peripheral device is an internal or external device that connects directly to a computer but does
not contribute to the computer's primary function, such as computing. It helps end users to access
and use the functionalities of a computer. A peripheral device provides input/output (I/O)
functions for a computer and serves as an auxiliary computer device without computing-intensive
functionality. Peripheral devices connect with a computer through several I/O interfaces, such as
communications (COM), Universal Serial Bus (USB) and serial ports.

Some devices that perform both input and output operations are referred to as I/O (input/output)
devices and their operations are called I/O operations. Examples of common input and output
components are disk drives and modems. A touch screen monitor on a mobile phone, tab or ATM, a
videogame controller that shakes when the player is hit can both be considered an I/O device. A CD
or DVD burner would also be an I/O device, since it can both read and write data to discs.

5|Page
Nayeem Mahmood / 1AM / C161026

You might also like