Let n = 6 be the
number of bits used to represent an integer.
(a) (4pts) What is the range of integers that can be represented
in
• UBI?
• 1CF?
• 2CF?
• SMF?
(b) (8pts) Make a table that lists all negative numbers in 1CF, 2CF and SMF
Let n = 6 be the number of bits used to represent an integer. (a) (4pts)...
Given n bits, how many unsigned integers can be represented with the n bits? What is the range of these integers? (6 points) There are 26 characters in the alphabet we use for writing English. What is the least number of bits needed to give each character a unique bit pattern? How many bits would we need to distinguish between upper- and lowercase versions of all 26 characters? (12 points)
2.) What is the largest positive number in decimal, that can be represented using 8 bits? Each groups of binary numbers can be represented more compactly in base-16 numbering, which is called hexadecimal. The hexadecimal digits are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. 3.) What range of positive decimal numbers can one hexadecimal digit represent? Colors on a computer monitor are represented by 6 hexadecimal numbers, the first pair to the left specifies the amount of red to display, the middle pair of numbers specify...
1. (Integers: primes, divisibility, parity.) (a) Let n be a positive integer. Prove that two numbers na +3n+6 and n2 + 2n +7 cannot be prime at the same time. (b) Find 15261527863698656776712345678%5 without using a calculator. (c) Let a be an integer number. Suppose a%2 = 1. Find all possible values of (4a +1)%6. 2. (Integers: %, =) (a) Suppose a, b, n are integer numbers and n > 0. Prove that (a+b)%n = (a%n +B%n)%n. (b) Let a,...
1.8 (1 marks) A computer has a word length of 8 bits (including sign). If 2’s complement is used to represent negative numbers, what range of integers can be stored in the computer? If 1’s complement is used? (Express your answers in decimal.)
Ok = (6) Let n be a positive integer. For every integer k, define the 2 x 2 matrix cos(27k/n) - sin(2nk/n) sin(2tk/n) cos(27 k/n) (a) Prove that go = I, that ok + oe for 0 < k < l< n - 1, and that Ok = Okun for all integers k. (b) Let o = 01. Prove that ok ok for all integers k. (c) Prove that {1,0,0%,...,ON-1} is a finite abelian group of order n.
Let n be an odd positive integer. Consider a list of n consecutive integers, not necessarily starting with 1. Show that the average is the middle number (that is the number in the middle of the list when they are arranged in an increasing order). What is the average when n is an even positive integer instead. We learned that for the odd numbers, we would have to show why n-1/2(2k+n)+(k+n) all over n equals k+(n+1)/2.
Question 6 (1 point) Let a be an array, let N be the number of elment used in the array. For the given set of code below, what does the output represent? int sum = 0; for (int i = 0; i < N;i++) if (a[i] > 0) sum = sum + 1; textBox1.text = " + sum; Execution of code with nothing being printed in textBox1. Execution of code with printing all numbers Execution of code with counting the...
number thoery
just need 2 answered
2. Let n be a positive integer. Denote the number of positive integers less than n and rela- tively prime to n by p(n). Let a, b be positive integers such that ged(a,n) god(b,n)-1 Consider the set s, = {(a), (ba), (ba), ) (see Prollern 1). Let s-A]. Show that slp(n). 1. Let a, b, c, and n be positive integers such that gcd(a, n) = gcd(b, n) = gcd(c, n) = 1 If...
Assume that an n-bit integer (represented by standard binary notation) takes any value in the range 0 to 2^n − 1 with equal probability. (a) For each bit position, what is the probability of its value being 1 and what is the probability of its value being 0? (b) What is the average number of “1” bits for an n-bit random number?
I randomly pick two integers from 1 to n without replacement (n a positive integer). Let X be the maximum of the two numbers. (a) Find the probability mass function of X. (b) Find E(X) and simplify as much as possible (use formulas for the sum and sum of squares of the first n integers which you can find online).