A.
Explanation of Solution
Formula to find the numeric value for infinite string:
The formula to find the numeric value for infinite string using in terms of “Y” and “k” is given below.
From the given question, assume the infinite string of the form,
For a k-bit sequence,
Hence, to find the numeric value of the string “n” is
B.
(a)
Explanation of Solution
Compute the numeric value of the string for “y = 101”:
From the part A, the formula is
Here, value of “y” is “101” and value of “k” is number of bits in “y”. So, k = 3.
First compute the value of
(b)
Explanation of Solution
Compute the numeric value of the string for “y = 0110”:
From the part A, the formula is
Here, value of “y” is “0110” and value of “k” is number of bits in “y”. So, k = 4.
First compute the value of
(c)
Explanation of Solution
Compute the numeric value of the string for “y = 010011”:
From the part A, the formula is
Here, value of “y” is “010011” and value of “k” is number of bits in “y”. So, k = 6.
First compute the value of
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Computer Systems: Program... -Access
- Here__Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Example 1: Input: grid = [ ["1","1","1","1","0"], ["1","1","0","1","0"], ["1","1","0","0","0"], ["0","0","0","0","0"] ] Output: 1 Example 2: Input: grid = [ ["1","1","0","0","0"], ["1","1","0","0","0"], ["0","0","1","0","0"], ["0","0","0","1","1"] ] Output: 3.arrow_forwardThe Lingala Language of Republic of Congo has 35 letters. Consider an Affine cipher, which encrypts each letter according to the rule: C=(p×k1+k2) mod 35. Here C, p, k1, and k2 are each members in the range 0 to 34, where C represents the ciphertext letter, p the plaintext letter, and k1 and k2 are constant keys. How many possible keys does this affine system have? Explain in details.arrow_forwardLet's say that the components of U are arranged in ascending order, with U = l, 2, 3, 4, 5, 6, 7, 8, 9, and 1 O, which means that aj = i. What bit strings encompass the subsets of all odd numbers in U, all even integers in U, and all integers in U that do not exceed 5?arrow_forward
- Let B be the set of all binary strings of length 8. {“00000000”, “00000001”, … “11111110”, “11111111”} How many elements of B have no adjacent digits with the same value? How many elements of B are palindromes? How many elements of B contain two or more 0s?arrow_forwardhow many 11 - strings (that is, bit strings of length 11) are there which: a. start with sub - string 011 b. have weight 8 (i.e contain exactly 8 1's ) and start with the sub - string 011 c. either start with 011 or end with 01 (or both) d. have weight 8 and either start with 011 or end with 01 (or both)arrow_forwardGive the regular expression for the following language over the alphabet { b , . , @ }L = {w | w represents and email address}.b: represents any character.Hint: before and after @ any number of dots can be found, before and after each dot there is at leastone b.Examples:bbb.bbbb@bb.bbbbbbb@bb.bbb.bbbbbbbb.bb@bb.bbb.bbbb.bb.b.b.b@bb.b.bb.bbarrow_forward
- How many 14-bit strings (that is, bit strings of length 14) are there with: (a) start with sub-string 011? (b) have weight 7 (i.e., contain exactly 7 1’s) and start with the sub-string 011? (c) either start with 011 or end with 01 (or both)? (d) have weight 7 and either start with 011 or end with 01 (or both)?arrow_forwardGive a transducer TM that takes #bi as input and computes #bi+1, where i is an integer and i>0, and bt is a binary representation of t, for an integer t. For example, if #001 is on the tape as input, then after the TM has executed, the tape should contain #010 in the leftmost cells, with infinite blanks after it. You can assume that the input alphabet is {#,0,1}. If the input is badly formed (e.g., #01# has too many #'s), then the TM can "hang" or go to qr.arrow_forward“Hamming,” will read in an integer “k” and a bit string “s” from the command line, calculate the “Hamming Distances,” and prints all bit strings that have Hamming distance of “k” from “s.” Note: The Hamming Distance is equal to the number of bits in which the two strings differ. A sample run would be as follows. >java Hamming 2 00111111 1001 1010 0101 0110 0000arrow_forward
- CRYPTOGRAPHY.In this problem we will work through a round of DES. For notational simplicity, assume it is the first round. Please enter all answers as strings of 0's and 1's. The input is the 64 bit block 00000000000000100000000000000010000001000000010001000000000000000000000000000010000000000000001000000100000001000100000000000000 Suppose that the subkey for the current round is this 48 bit number: 000000000000000001000000000000000000000000000000000000000000000001000000000000000000000000000000 What does the 64 bit state look like after the IP transformation is applied to the input? Now find L0L0 and R0R0, the left and right halves of the state.L0=L0= R0=R0= What is the result of applying the expansion box to R0R0? E(R0)=E(R0)= What is the result of XORing the subkey with E(R0)E(R0)? k1⊕E(R0)=k1⊕E(R0)= We now apply the S-box transformation. S(k1⊕E(R0))=S(k1⊕E(R0))= Finally we apply the permutation box to complete the function ff. f(R0)=P(S(k1⊕E(R0)))=f(R0)=P(S(k1⊕E(R0)))= We…arrow_forwardSuppose you have a finite state machine that accepts bit strings divisible by 11. The FSM has 11 states R0, R1, ... , R10, each corresponding to the remainder when dividing by 11. Input is fed to the FSM one bit at a time from left to right, the same way we did in our in-class examples. If the machine is currently in state R7, an input of 1 should transition it to which state? Type the subscript only of the new state. Your answer should be an integer between 0 and 10, inclusive.arrow_forwardQ-2 Suppose that you pick a bit string from the set of all bit strings of length ten. What is the probability that the bit string has more 0s than 1s?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education