This document provides solutions to questions related to computer fundamentals. It covers topics such as functions, tables, conversions, and addition of binary, octal, and hexadecimal numbers.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Running head: COMPUTER FUNDAMENTALS ENS1161D COMPUTER FUNDAMENTALS Name of the Student Name of the University Author Note
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
1COMPUTER FUNDAMENTALS Question 1: The functions f, g and h are defined on the set {0,1,2,3,….,12} is given below. i)Hence, f(g(h(10))) = f(g(10)) = f(12) = 12. Now,f−1(h−1(6))=f−1(7)= 11 ii)For constructing the table of values forg(f−1(x))at firstf−1(x)is calculated and then the g function of that value is calculated. x0123456789101112 g(f−1(x))0151125588112812 iii)The table for h(h(x) is shown below. x0123456789101112 h(h(x))0123456789101112 Hence, as h(x) = x hence,h−1(x)= h(x).
2COMPUTER FUNDAMENTALS iv)The table forf−1(x)is the following. x0123456789101112 f−1(x)0169105211834712 Question 2: The set of Growers G = {a,b,c,d} and the set of retailers R = {e,f,g} and a set of customers C = {m,n,p,q,r}. The relations A and B are given by G x R and R x C which are defined by: {aAe, bAg, cAf, dAe, dAg} and {eBn, eBr, fBm, fBq, gBp} respectively. i)Hence, the relationship matrix f−1(x)
3COMPUTER FUNDAMENTALS M(A) = efg a100 b001 c010 d101 M(B) = Mnpqr e01001 f10010 g00100 ii)The inverse of relation A =A−1¿M(A)T= Abcd e1001 f0010 g0101 The inverse of the relation B =B−1=M(B)T= efg m010 n100
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
4COMPUTER FUNDAMENTALS p001 q010 r100 iii)The logical matrix product of M(A)M(B) will follow the Boolean OR convention. Hence, after computing M(A)M(B) and(M(A)T)(M(B)T)and then finally computingM(A)M(B)(M(A)T)(M(B)T)the query can be answered. Now, it is found that the customer p has the relation with retailer g. Now, the retailer g gets goods from growers’ b and d. Now, d also supplies goods to retailer e and e supplies to the customers n and r. Hence, customers n and r receives goods from same grower as received by p. Question 3: a) i) 11910= 7*8^0 + 6*8^1 + 1*8^2= 1678. 9610= 0*8^0 + 4*8^1 + 1*8^2 = 1408 ii) Now, for converting the octal numbers into binary each of the octal numbers are represented by three binary digits. Hence, 1678= ((001)(110)(111))2= (1110111)2 1408= ((001)(100)(000))2= (1100000)2 iii) Now, the binary numbers are converted to hexadecimal by grouping the numbers by 4 digits. (1110111)2= ((0111)(0111))2= (7716) (1100000)2= ((0110)(0000))2= (6016)
5COMPUTER FUNDAMENTALS iv) Now, the hex addition rule is same as the decimal addition rule except the carry is forwarded to the next upper bit when the result of addition exceeds F(15). Hence, (7716) + (6016) = (D7)16. v) The hexadecimal sum is then converted to binary. (D7)16= ((1101)(0111))2= (11010111)2 Then the binary is converted to octal. (11010111)2= ((011)(010)(111))2= 3278. Now, 3278is converted to decimal by the following method. 3278= 3*8^2 + 2*8^1 + 7*8^0 = 3*64 + 16 + 7 = (215)10 Hence, in table format Decimaloctalbinaryhexadecimal 119167111011177 96140110000060 21532711010111D7 b)i) The decimal fraction 0.53125 is converted to binary by the following method. 53125 is divided repeatedly by 2 and then the remainder in each division is assigned from top to bottom order. Hence, the result is (0.10001)2 It can be verified that (0.10001)2= 1*2^(-1) + 0*2^(-2) + 0*2^(-3) + 0*2^(-4) + 1*2^(-5) = 0.5 + 0.0313 = 0.5313. Now, 0.53125 can be approximated to 0.5313. ii) (0.09375)10= (0.00011)2.
6COMPUTER FUNDAMENTALS It can be verified that, (0.00011)2= 0*2^(-1) + 0*2^(-2) + 0*2^(-3) + 1*2^(-4) + 1*2^(-5) = 0.0938. 0.09375 ~ 0.0938. iii) Now, the binary fractions are added in binary addition method where 1+1 = 0 (carry 1), 1+0 = 1(carry 0), 0+1 = 1 (carry 0) and 0+0 = 0(carry 0). 0.10001 + 0.00011 = (0.10100)2 iv) Now, the fractional binary is converted to decimal in the following way. (0.10100)2= 0.6250. c) i) 1101011 +1001111 =(10111010)2 Rules for binary addition followed: 1+1 = 0(carry 1), 1+0 = 1(carry 0), 0+1 = 1(carry 0), 0+0 = 0 (carry 0). ii) (2756)8 +(5724)8
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
7COMPUTER FUNDAMENTALS = (10702)8 Rules for octal addition followed: if sum exceeds 7 carry 1 is forwarded to next bit addition and result is (sum – 8). Otherwise if sum is less or equals 7 then result is sum and carry is 0. iii) The hexadecimal addition is given below. (2AE5C)16 +(B52F7)16 = (E0153)16 Now, the hex addition rule is as follows: when the sum is over F then the carry to the next bit addition is 1 and result is (sum-16). Otherwise carry is zero and result is the sum. c)The rules BCD addition of hex numbers is the following. At first each hex digit is converted to 4 bit binary digits. Then individual addition of each 4 bits are performed by the following rule. i) The carry is zero and sum is less than or equal to 9 then result is sum. ii) If the sum is more than 9 then 6 in BCD form is added to the result. Now, if there is carry in MSB bit addition the carry is put in the MSB of result. d) i)29578 = 0010 1001 0101 0111 1000 +31495 = 0011 0001 0100 1001 0101
8COMPUTER FUNDAMENTALS Hence, 00101001010101111000 00110001010010010101 =0101=1010=1001=10000=1101 =0101=1010=1010+ 0110 ==0000=1101 Question 4: i) a) The provided number = 0010 1010 As, C = 1 hence the decimal equivalent of 0000 0001 0010 1010 will be 298 b) The number given is 1100 1001 As, C = 0 hence the decimal equivalent of 1100 1001 will be 201 c) The number given is 1011 1100 As, C = 1 hence the decimal equivalent of 0000 0001 1011 1100 will be 444 d) The number given is 0110 1011 As, C = 0 hence the decimal equivalent of 0110 1011 will be 107
9COMPUTER FUNDAMENTALS e) The number given is 0111 0011 As, C = 1 hence the decimal equivalent of 0000 0001 0111 0011 will be 371 ii) a) The number given is 0010 1010 As, N= 0, V = 0 hence the decimal equivalent of 0010 1010 will be 42 b) The number given is 1100 1001 As, N = 1 and V= 0 hence the decimal equivalent of 0011 0110 + 1 = 00110111 = -55 c) The number given is 1011 1100 As, N = 1 and V = 0 hence the decimal equivalent of 0100 0011 + 1 = -68 d) The number given is 0110 1011 As, N = 0, V = 0 hence the decimal equivalent of 0110 1011 = 107 e) The number given is 0111 0011 As, N = 0, V = 1 hence the decimal equivalent of 1000 1100 + 1 = 10001101 = -141 Question 5:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
10COMPUTER FUNDAMENTALS Sequence position = (row number -1)*(number of columns) + column number Row number = CLG(sequence position / number of columns) Column number = MOD(sequence position -1, number of columns) +1 So, by using these formulas the table below is filled up. Number of columns in array Row numberColumn numberSequence position (i)14511(5-1)*14 +11 = 67 (ii)36127(1-1)*36 + 27 = 27 (iii)948(4-1)*9 + 8 = 35 (iv)281711(17-1)*28 + 11 = 459 (v)30CLG(98/30) = 4MOD(98- 1,30)+1 = 8 98 (vi)45CLG(300,45) = 7 MOD(300- 1,45)+1 = 30 300 (vii)24CLG(85,24) = 4MOD(85- 1,24)+1 = 13 85