0% found this document useful (0 votes)
13 views39 pages

Lab Manual - CT-1

Uploaded by

shashank874878
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)
13 views39 pages

Lab Manual - CT-1

Uploaded by

shashank874878
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/ 39

1|Page

School of Computer Science, Engineering & Applications

Academic Year: 2024-25

CSE 1003
Computational Thinking

Year – Ist
Semester – Ist

Lab Manual

Computational Thinking
2|Page

Index
Sr. Page
No Name No Remark
1 Study the configuration of different Computer Systems. 4

2 Study and execute different useful applications Software’s: 12

A. Create a certificate or resume using Microsoft


Word
B. Create a PowerPoint Presentation (Topic:
Computer system Configuration)
C. Create an Excel sheet for exam result
3 Study and solve number systems with each conversion 15

A. Binary to Decimal
B. Decimal to Binary

4 Study and solve number systems with each conversion 20

A. Binary to Hexadecimal
B. Hexadecimal to Binary

5 Case study: solve the given problems using computational 28


thinking, write algorithms and prepare flowcharts:

A. Calculate the product of two given numbers.


B. Check the given number is prime or composite.

6 Case study: solve the given problems using computational 33


thinking, write algorithms and prepare flowcharts.
A. Find the largest/smallest number among the
given two numbers.
B. Display the terms of the Fibonacci series

Computational Thinking
3|Page

CERTIFICATE
This is to certify that Mr. Atharva Nilesh Patil, PRN: 20240802311 of class: B.Tech-CSE
( Batch 2024 has completed practical work in the course of Computational Thinking of First
Year Engineering (B. Tech CSE) within SCSEA, as prescribed by D.Y. Patil International
University, Pune during the academic year 2024 - 2025.

Absent / Attended / Late / Partially Completed / Complete

Date: Teaching Assistant Faculty CT

Computational Thinking
4|Page

Lab – 1

AIM – Study the configuration of different Computer Systems.

THEORY – To study and understand the configuration of different Computer


Systems.

PERFORM OPERATION: –
1) MOTHER BOARD –

A motherboard is the main circuit board in a computer that connects and allows
communication between all hardware components, including the CPU, RAM,
storage, and peripherals. It contains:

CPU Socket: Slot for the processor.


RAM Slots: Holds the system memory.
Expansion Slots: For graphics cards, sound cards, etc.
Storage Connectors: SATA and M.2 slots for drives.
Power Connectors: To supply power to the board and CPU.
I/O Ports: USB, HDMI, Ethernet, and more

Computational Thinking
5|Page

2) CPU -

A CPU (Central Processing Unit) is the main part of a computer that processes
instructions and runs programs. It consists of key components like:

ALU (Arithmetic Logic Unit): Handles math and logic operations.


Control Unit: Directs the CPU’s actions.
Registers: Temporary data storage.
Cache: Speeds up access to frequently used data.
CPU Functions:
Fetch: Retrieves instructions from memory.
Decode: Understands the instructions.
Execute: Performs the operations.
Store: Saves the results.

3) RAM –

Computational Thinking
6|Page

RAM (Random Access Memory): Fast, temporary memory used for running
applications. Data is lost when power is off.

4) ROM –

ROM (Read-Only Memory): Permanent memory used to store system firmware.


Data is retained even without power.

5) STORAGE DRIVES –
a) Hard disk drives (HDDs):

Computational Thinking
7|Page

Hard Disk Drives (HDDs) are traditional storage devices used in computers to
store data such as files, applications, and operating systems. They have been a
common form of storage for decades and are still widely used due to their large
storage capacities and relatively low cost per gigabyte.

b) Solid-state drives (SSDs):

Solid-State Drives (SSDs) are modern storage devices that use flash
memory to store data. Unlike Hard Disk Drives (HDDs), SSDs have no
moving parts, making them faster, more reliable, and more energy-
efficient.
6) Data Transfer Ports –
Computational Thinking
8|Page

a) USB Ports –
USB Ports (Universal Serial Bus) are standard interfaces used to connect a wide variety of peripheral
devices to computers, smartphones, and other electronics. They enable communication between devices
and provide power for charging or powering connected devices.

i) USB-A: The classic rectangular port, most commonly found on older computers and
devices. It's compatible with USB 1.0, 2.0, and 3.x standards.
ii) USB-B: A less common square-shaped port typically used for printers and other large
peripherals.
iii) USB-C: A newer, smaller, and reversible connector that supports faster data transfer (up to
40 Gbps with Thunderbolt 3/4), higher power delivery (up to 100W), and can transmit
video signals (DisplayPort or HDMI). Its versatility is leading to widespread adoption
across smartphones, laptops, and other devices.

b)Thunderbolt –

Thunderbolt is a high-speed hardware interface developed by Intel, in collaboration with Apple, that
allows for the transfer of data, video, and power over a single connection. Thunderbolt ports are versatile
and can support various types of connections, including DisplayPort for monitors, PCI Express (PCIe) for
high-speed data, and even USB.

7) Video Output Ports -

Computational Thinking
9|Page

a) HDMI (High-Definition Multimedia Interface):

HDMI is a widely-used audio and video interface standard for transmitting uncompressed video and
audio signals from a source device (like a computer, Blu-ray player, or gaming console) to a display
(such as a TV, monitor, or projector). It supports high-definition video resolutions and multi-channel
audio, making it ideal for home theater setups and gaming.

b) DisplayPort:

DisplayPort is a digital display interface primarily used to connect a video source (like a computer) to
a monitor or projector. It supports high resolutions and refresh rates, making it popular for gaming and
professional applications. Unlike HDMI, it was specifically designed for computer displays and can
handle video and audio signals. DisplayPort also supports daisy-chaining multiple monitors.

c) VGA (Video Graphics Array):

VGA is an older analog video interface used to connect computers to monitors, projectors, or other
display devices. It transmits video signals but does not support audio. VGA is limited in resolution and
image quality compared to modern digital interfaces like HDMI and DisplayPort, and it's largely
phased out in favor of newer standards.

8) Audio Ports -

a) 3.5mm Audio Jack:


Computational Thinking
10 | P a g e

The 3.5mm audio jack is a widely-used analog connector for transmitting audio signals. It is
commonly found on devices such as headphones, smartphones, laptops, and audio systems. This port
is used for both input (microphones) and output (headphones or speakers). It supports stereo sound
and, in some cases, microphones through a TRRS (Tip-Ring-Ring-Sleeve) configuration, which adds
an additional ring to carry a microphone signal.

b) Optical Audio (TOSLINK):

Optical Audio, also known as TOSLINK (Toshiba Link), is a digital audio interface that uses light
(via fiber optic cables) to transmit audio signals. It is commonly used in home theater systems and
high-fidelity audio setups to provide high-quality, uncompressed audio. Optical audio supports
surround sound formats such as Dolby Digital and DTS, making it a popular choice for connecting
soundbars, receivers, and other audio equipment where high-quality audio is required.

9)Network Ports –

Ethernet:

Ethernet is a networking technology used for wired connections to local area networks (LANs). It
provides a stable and fast network connection, making it ideal for internet access in homes and offices.
Ethernet connections are typically made through RJ45 connectors and can support various speeds,
including 10/100 Mbps (Fast Ethernet), 1 Gbps (Gigabit Ethernet), and even 10 Gbps or higher with
more advanced standards. Ethernet is known for its reliability, lower latency, and resistance to
interference compared to wireless connections.

10) SMPS –
Computational Thinking
11 | P a g e

SMPS (Switched-Mode Power Supply) is an electronic power supply unit that converts electrical power
efficiently using switching regulators. SMPS are commonly used in computers and other electronic devices to
provide stable and regulated power to various components.

11) Cooling System -

Prevents overheating.
It includes:

a) Air Cooling: Uses fans and heatsinks.


b) Liquid Cooling: Uses coolant and radiators for better heat dissipation.

CONCLUSION – We have been able to explore, learn and understand the configuration
of the computers and its workings.

Computational Thinking
12 | P a g e

Lab – 2

AIM – Study and execute different useful applications Software’s:

A. Create a certificate or resume using Microsoft Word


B. Create a PowerPoint Presentation (Topic: Computer system Configuration)
C. Create an Excel sheet for exam result

THEORY – To create a resume, A presentation on the computer system configuration


in microsoft power point and To create an excel file with marks of the students with
Total, Max, Min, Average of there marks and their final Grade.

PERFORM OPERATION: –

1.RESUME –

Computational Thinking
13 | P a g e

2.PRESENTATION ON CONFIGURATION OF COMPUTERS –

Computational Thinking
14 | P a g e

Computational Thinking
15 | P a g e

3. EXCEL SHEET FOR EXAM RESULT –

CONCLUSION - By completing the given tasks we were able to create an Resume, an


Presentation on configuration of computer systems and an excel sheet on exam result.

Lab – 3

Computational Thinking
16 | P a g e

AIM – Study and solve number systems with each conversion

A. Binary to Decimal
B. Decimal to Binary

THEORY - Binary to decimal conversion involves translating a number from base-2 (binary) to base-
10 (decimal). Each digit in a binary number represents a power of 2, starting from the rightmost digit
(2^0). For example, the binary number 110111011101 can be calculated as
1×23+1×22+0×21+1×20=8+4+0+1=131 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0 = 8 +
4 + 0 + 1 = 131×23+1×22+0×21+1×20=8+4+0+1=13 in decimal.

Conversely, converting decimal to binary requires dividing the decimal number by 2 and recording the
remainder. This process is repeated with the quotient until it reaches zero. The binary number is then
formed by reading the remainders in reverse order. For example, to convert the decimal number
131313 to binary, dividing by 2 gives remainders of 1,0,1,11, 0, 1, 11,0,1,1, resulting in the binary
representation 110111011101.

PERFORM OPERATION: –

Computational Thinking
17 | P a g e

Computational Thinking
18 | P a g e

PERFORM OPERATION WITH C LANGUAGE

BINARY TO DECIMAL

Computational Thinking
19 | P a g e

DECIMAL TO BINARY

Computational Thinking
20 | P a g e

CONCLUSION –By performing this we are able to generate the conversion


between binary to decimal and decimal to binary.

Computational Thinking
21 | P a g e

Lab – 4

AIM – Study and solve number systems with each conversion

A. Binary to Hexadecimal
B. Hexadecimal to Binary

THEORY –

1. Binary Numbers :

Binary numbers operate in a base-2 system, utilizing only two digits: 0 and 1. Each digit's position
represents a power of 2. This system aligns with digital electronics, where two states (on/off)
correspond to the binary values.

For example, the binary number 1011 translates to decimal by calculating:

1×23+0×22+1×21+1×20=8+0+2+1=11.1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 8 +


0 + 2 + 1 = 11.1×23+0×22+1×21+1×20=8+0+2+1=11.

2. Hexadecimal Numbers :

Hexadecimal numbers function in a base-16 system, using digits 0-9 and letters A-F (where A=10,
B=11, etc.). Each digit's position represents a power of 16. This system is beneficial in computing as it
provides a more compact representation of binary values.

For example, the hexadecimal number 2F converts to decimal as follows:

2×161+15×160=32+15=47.2 \times 16^1 + 15 \times 16^0 = 32 + 15 =


47.2×161+15×160=32+15=47.

Due to their direct relation of the numeral system they are able to be converted as shown.

Computational Thinking
22 | P a g e

PERFORM OPERATION WITH C LANGUAGE: –

Programs :
1) Binary to Hexadecimal :

Computational Thinking
23 | P a g e

Computational Thinking
24 | P a g e

Code in C language :

Computational Thinking
25 | P a g e

2) Hexadecimal to Binary :

Computational Thinking
26 | P a g e

I. Hexadecimal to Binary ( Input as single digit Hexadecimal) :

Computational Thinking
27 | P a g e

II. Hexadecimal to Binary :

Computational Thinking
28 | P a g e

CONCLUSION – Hence, we were able to convert Binary to hexadecimal and


hexadecimal to binary and were able to make codes and execute it successfully to
make the conversions.

Computational Thinking
29 | P a g e

Lab – 5

AIM – Case study: solve the given problems using computational thinking, write
algorithms and prepare flowcharts:

A. Calculate the product of two given numbers.


B. Check the given number is prime or composite.

THEORY –
Program A : Calculate the product of two given numbers.
Multipication is a basic airthmatic operation which we will perform by taking input of
two numbers and multiply the and give an output of the performed multiplication.

Program B : Check the given number is prime or composite.


A prime number is a number which has only two factors, the number itself and 1
. The composite number has more factors . In the program we will check if the number
is prime or the number is composite by takeing an input of a number and check
whether it is a prime number or a composite number.

PERFORM OPERATION WITH C LANGUAGE: –

Programs : 1) Calculate the product of two given numbers.

Algorithm :

1. First we specify the num 1, num 2 and product.


2. Then we take first input number from the user .
3. Then we take the second input number from the user.
4. Then we store the multiplication of the two numbers in product.
5. Then we print the numbers and there product.

Computational Thinking
30 | P a g e

Flowchart :

Computational Thinking
31 | P a g e

Source code :

Output :

Programs : 2) Check the given number is prime or composite.

Algorithm :

1.First we specify n, I, and flag.


2.Then we take an input of a number.
3.Then we check whether the number is greater than one or less than one.
4.If the number is less than 1 then print the number is nor composite nor prime.

Computational Thinking
32 | P a g e

5. If the number is greater than 1 then check if it is a prime number or nit.


6. If the number is prime update the value of flag to 1.
7.If the value of flag is 1 then print the number is prime and if the value of the
flag is 0 print the number is composite.

Flowchart:

Computational Thinking
33 | P a g e

Source code :

Output ;

CONCLUSION – Here we were Successfully Run the program for Multiplication and
for identifying prime number.

Computational Thinking
34 | P a g e

Lab – 6

AIM – Case study: solve the given problems using computational thinking, write
algorithms and prepare flowcharts:

A. Find the largest/smallest number among the given two numbers.


B. Display the terms of the Fibonacci series

THEORY –
1. Algorithm:

An algorithm is a step-by-step procedure used to solve a specific problem or perform a


task. It provides a clear and logical sequence of instructions that can be implemented
in a programming language. Key characteristics of a good algorithm include
correctness, efficiency, and simplicity.

2. Flowchart:

A flowchart is a visual representation of an algorithm. It uses symbols such as ovals,


rectangles, and diamonds to depict the flow of a process or logic. Flowcharts help to
plan and visualize the steps of a program before coding.

PERFORM OPERATION WITH C LANGUAGE: –

Program: 1) Find the largest/smallest number among the given two numbers.

Algorithm :

1. First we specify num 1 and num 2.


2. Then we check whether the num 1 is greater or num 2 and print the greatest
and the smallest number using if else.
3. If both the numbers are equal we print that both numbers are equal.

Computational Thinking
35 | P a g e

Flowchart :

Source code :

Computational Thinking
36 | P a g e

Output :

Program: 2) Display the terms of the Fibonacci series

Algorithm :
1. First we Specify n, First, second, next and i.
2. Then we take an input of how many terms of Fibonacci series to print.
3. Then we use for loop to run a inner program.
4. In that inner program we add first and second and store the value in next
and replace the value firxt to second and second to first and print them till
the specified given number is approached.

Computational Thinking
37 | P a g e

Flowchart:

Computational Thinking
38 | P a g e

Source code :

Output :
Computational Thinking
39 | P a g e

CONCLUSION – We were able to successfully run the programs in which we first


were able to indentify the largest and the smallest numbers given in the input. Then in
the second program we were able generate the terms of Fibonacci
Series given in the input.

Computational Thinking

You might also like