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

Week 2 Lab-Computer Architecture & Algorithms

Uploaded by

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

Week 2 Lab-Computer Architecture & Algorithms

Uploaded by

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

Name:

Student ID:

INFS 1101 - Lab 1


Exercise 1:
Using the WMIC command line in the CMD interpreter, extract the relevant information of the following
components:

 Installed Programs:
Programs

Used command Line: _______________________________________

 RAM:
RAM (memorychip)
caption
capacity
devicelocator
Manufacturer
speed

Used command Line: _______________________________________

 Disk Drive:
Disk Drive(diskdrive)
model
Manufacturer
size
status
Name:
Student ID:

Used Command Line: __________________________________________

 Mouse:
Mouse(win32_pointingdevice)
caption
deviceID
Manufacturer
Name
status

Used Command Line: _____________________________________________

 Operating System:

Operating System
caption
version
osarchitecture
buildnumber

Used Command Line: _______________________________________________


Name:
Student ID:

Exercise 2:
1-Utilise the following template to develop a flowchart that will illustrate an algorithm that will take as
input the current year, and year of birth, and will calculate the age in years.

2-illustrate the same algorithm with a pseudocode


Name:
Student ID:

Exercise 3:
1-List in the following table 5 programming languages, and list one domain of computer science where
each of these programming languages is used, example Python is extensively used in Artificial
Intelligence,

Programming Language Domain of Utilization

2-Define the concept of loosely typed and strongly typed programming languages:

Loosely typed programming languages: __________________________________________

Strongly typed programming languages: ___________________________________________

3-Give few examples of each:

Strongly Typed Programming Language Loosely Typed Programming Language

4-In the table below, you'll find lines of code from various programming languages. Your task is to
identify whether each line of code represents a loosely typed or strongly typed behavior. Please fill in
the 'Identify the Type' column accordingly.

Line of Code Identify the Type


int number = 5;
String text = "Hello";
String result = text + number;
age = 25
name = "Alice"
message = name + " is " + age + " years old."
int num = 10;
Name:
Student ID:

string phrase = "Hello, world!";


string output = num + phrase;
$message = "Welcome to PHP!";
$price = 7.50;
$quantity = 2;
$total = $price * $quantity;

Exercise 4:

1- Compare Von Neumann and Harvard Architectures in the following aspects:

Aspect Von Neumann Harvard


Architecture Architecture
Usage of Memory Units
Speed of Operation
Number of Cycles Needed to Execute
an Instruction
Parallel Fetching of Data and
Instructions
Name:
Student ID:

2-Highlight T if the statement is true and F if the statement is false.

. The "Fetch" phase of the Fetch-Decode-Execute cycle involves retrieving the next instruction from
memory. T F

. During the "Decode" phase, the fetched instruction is executed. T F

. During the "Decode" phase, the computer figures out what the instruction means. T F

. In the "Execute" phase, the ALU (Arithmetic Logic Unit) performs arithmetic and logical operations
specified by the instruction. T F

. The Fetch-Decode-Execute cycle is not repeated for every instruction in a program. T F

. The Fetch-Decode-Execute cycle is a fundamental process in the execution of a computer program. T F

. The "Fetch" phase grabs the instruction from memory, but not the data it needs. T F

. The "Fetch" phase always happens before the "Decode" phase. T F

. Registers are small, fast storage locations inside the CPU used for temporary data storage during the
Fetch-Decode-Execute cycle. T F

You might also like