Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

section b question three a) convert the decimal number 185 to its bcd e…

Question

section b
question three
a) convert the decimal number 185 to its bcd equivalent. 5
b) change the binary number 1011010110 to hexadecimal. 5
c) write a c program that accepts two numbers as input and then computes the sum and display it. 10
question four
a) define what is meant by operating system of a computer. outline any 5 of its functions. 10
b) state with the aid of examples any two different classes of computer software. 4
c) give the meaning of the following:
i. software 2
ii. virus 2
iii. firewall 2
question five
a) with the aid of a diagram give an explanation for the following network topologies: i) ring ii) star iii)bus 12
b) discuss with the aid of a diagram the purpose of the following devices in data communications: i) hub ii) modem 8
question six
a) define the following terms:
i. variable 2
ii. file 2
iii. program 2
iv. array 2
v. constant 2
b) write a c program that calculates n! where n is a number entered at the keyboard and n!=n(n - 1)(n - 2)---432*1. 10
question seven
write a c program to copy the contents of one file to another file with a new name. the program should ask the user for the name of the file to copy from and the name of the new file. 20

Explanation:

Response
Question Three
a)

Step1: Split decimal digits

Split 185 into 1, 8, 5. Each digit is converted to 4 - bit BCD.
1 in BCD is 0001, 8 in BCD is 1000, 5 in BCD is 0101.

Step2: Combine BCD digits

Combine them together: 0001 1000 0101

Step1: Group binary digits

Group the binary number 1011010110 into groups of 4 - bits from right to left. Add leading 0s if necessary. We get 0010 1101 0110.

Step2: Convert each group to hexadecimal

0010 in hexadecimal is 2, 1101 in hexadecimal is D, 0110 in hexadecimal is 6.

Brief Explanations

An operating system (OS) is a software that manages computer hardware and software resources and provides common services for computer programs. Five functions: Process management (allocates CPU time to processes), Memory management (allocates and de - allocates memory), File management (organizes and controls access to files), Device management (controls input/output devices), User interface (provides a way for users to interact with the computer).

Answer:

0001 1000 0101

b)