QUESTION 15 6.3a Using C(..., ...) notation, write out a formula for the number of bitstrings of length 8 that contain two or fewer Os.
Q: a) What is the size of the code, i.e., how many different words are there? b) The Hamming weight of…
A: Here, we are going to find out the size of the binary code and also number of codewords who have…
Q: Write a regular expression to describe each of the following languages. Example: {w € [a, b}* : w…
A: (a) In regular expression theory, a regular expression is a pattern that defines a set of strings…
Q: 26 78.497 Bytes question. Write a recursive function that returns the sum of the digits of a…
A: Below is the complete solution with explanation in detail for the given question about a recursive…
Q: 1.3-4 Give examples to show that most of the laws of arithmetic fail to hold for floating-point…
A: Floating point in computer system is representation of numbers with decimal value.
Q: 6. For this question, mark all answers that apply. Assume any float or int is stored in 32 bits and…
A: If all values are normal and within range, the product of a group of floating-point numbers…
Q: Consider the following C fragment: short int sx = -4321; int x = SX; Assuming that a short int is 16…
A: We are given a C language fragment and asked for the value of the integer variable 'x'.Also given,…
Q: c. Suppose Alice computes the Secret suffix MAC (page 322: secret suffix MAC(x) = h(x || key)) for…
A: Answer is given below .
Q: Discuss the function below line by line, and also discuss the goal of this function. (Letter A ascii…
A: MyFunc: MOV r2, #0 ; r2 = 0 (zero) findEnd: ; find the end of the string LDRB r0, [r1], #1 ; r0 =…
Q: What language was this written in? What is the flag? DO NOT COPY FROM OTHER WEBSITES
A: The given program is written in Python language. there are two functions in the code: check() and…
Q: Let a binary operation * defined by a*b = (a)(a) + 2ab + (b)(b). What is a * b if a = 2 and b = 1? *…
A: Here in question a binary *operation is defined as a*b = (a)(a) + 2ab + (b)(b). And we have to…
Q: c) Consider the pseudo-codes representing two computer functions called loopA and loopB as follows:…
A: The answer of this question is as follows:
Q: From the given code from step 1-step19 a- What are the memory location addresses that will be…
A: A typical memory representation of a C program consists of the following sections.1. Text segment…
Q: Question 8 Find value x such that the address of buf[x] equals to the address of p. Both buf and p…
A: Q8)
Q: The statement that copies the value of variable x to the memory cell pointed to by the integer…
A: Pointer: Pointer is a type of variable which is used to store the address of another variable. A…
Q: The speed of RSA hinges on the ability to do large modular exponentiations quickly. While e can be…
A: The Square and Multiply algorithm is a method for fast modular exponentiation and is often used in…
Q: Q2. Consider a valid double pointer char** mypointer in a 32-bit system. What is sizeof(*mypointer)?
A: First we should understand what is pointer . Consider that you had created the variable in the c…
Q: Using the last 2 digits of your matrix no. (CD2000ab) as the data for below C codes (e.g. CD190018;…
A: This is the C language program. We must have to identify the answer to the given C program. So, we…
Q: MO 500HJ,AL H.W:- Find the value of Z Where Z=AX BX+CX*DX, IF AX=4,BX=8,CX=2,DX=3 result in memory…
A: We need to find the value of Z.
Q: 1. Graphics and audio applications can take advantage of performing simultaneous operations on short…
A: Parallelism is the technique to make programs faster by performing several computations at the same…
Q: Q5 Write C expressions, in terms of variable x, for the following values. Your code should work for…
A: #include<stdio.h> int main(){ int x = 0x87654321; //Bitwise anding x with 0x000000FF…
Q: was corrupted during the op esult was due to a round-of esult was due to an overflo" ating-point…
A: Below is the code in c++ as language not specified and output:
Q: Questions 1-3: Assume radix sorting of 1024 floats on a 32-bit machine with 8 passes (rounds). The…
A: Hello studentGreetingsIn this set of questions, we are considering the scenario of radix sorting…
Q: Consider the following code 1 #include 3 typedef unsigned char *byte_pointer; 4 5 void…
A: Hi Dear, When we call these three function in Little endianshow_bytes(valp, 1); output =…
Q: 1 8 23 EXPONENT FRACTION N = (-1)5 × 1.fraction x 2@xponent– 127 Here the exponent has the limits: 1…
A: We usually represents floating point numbers in IEEE 754 standard. According to this standard while…
Q: Assume you have you are storing the following information: the string Pencil followed by a value…
A:
Q: 7. Consider the following decimal numbers A=28 and B=11 i) Represent the two numbers in binary using…
A:
Q: d. Write a function Encode as follows: • // Return M^e mod PQ • int Encode (int M, int e, int PQ);…
A: RSA is a public key encryption algorithm used for secure data transmission. The key generation in…
Q: II. Assume we are running code on a 10-bit machine using two's complement arithmetic for signed…
A: Binary Representation : Binary language is a computer-understandable language. This language is made…
Q: Write a Program to find the largest number in a block of data. Tength of block is in memory location…
A: the code is an given below :
Q: Qs) If you have the following two arrays of 40 signed numbers: Y stored at 13000H and contains 8-bit…
A: 1. take input from user i.e., first and second array.2. using for loop subtract the contains of…
Q: 4. Given a positive integer n, how many binary digits are needed to represent n? Construct the…
A: To find the number of binary digits needed to represent a positive integer n, we can use the…
Q: 1) IEEE 754 Floating Point Standard: This standard is used to represent floating-point numbers (real…
A:
Q: Write a C code to take input from text file and then do and update the multiplication operation…
A: StartCreate 2 files first input.txt with inputs and second output.txt Create file pointers "infile"…
Q: Problem 2 First describe an algorithm that converts a decimal number to a binary number in two's…
A: As per Bartleby guidelines “Since you have asked multiple questions with multiple sub-parts, we will…
Q: EE102 Homework #1 1.1 Convert the hexadecimal number 64CD to binary, and then convert it from binary…
A: AS PER OUR POLICY “Since you have posted a question with multiple sub-parts, we will solve the first…
Q: Programmin
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN…
Q: Assume 48 and 80 are signed 8-bit decimal integers. 48 in decimal → 0011 0000 in binary 80 in…
A: Overflow: If the result of an operation generates a value that exceeds the format numeric range is…
Q: Let us work out the relationship between ternary, binary, and decimal. If (2022)3 = (A)10 = (B)2,…
A: Question about number system conversation
Q: Generate MIPS code for the following code segments assuming that all variables are in memory…
A: Please refer below C code and corresponding MIPS code: void add(void) { int n1; int n2;int c;…
Q: SECTION 7.5: DATA SERIALIZATION INC 20. Write a C program to that finds the number of Is in a given…
A: Suppose if you have integer value 10 Its binary representation is 1010. So the number of set bits…
Q: (2) {w € [0, 1]* : w corresponds to the binary encoding, without leading O's, of natural numbers…
A: The language described in the provided context represents the binary encoding, excluding leading…
Q: d. 121five + 2five e. 10010wo + 10two f. 10100wo • 110rwo Perform each of these operations using the…
A: In this question what we have to do just simply take the number which is given after the whole…
Q: [4.1] Consider the number -1.36875 x 10¹ as the dividend and 5.625 x 10¹1 as the divisor. a. Find…
A: Binary numbers, sometimes referred to as base-2 numbers, are a type of number representation that…
Step by step
Solved in 2 steps
- ***Please do A or C*** a. Compute CBC-MAC for a message of 16 bits, “8642” (in Hexa). Assume a block size of 8 bits with an IV=F1 (in hexa). For simplicity, assume the encryption to be a simple XOR of the key with the plaintext. Let the encryption key be B4 (in Hexa). (Hint: Divide the message into blocks of 8 bits each; XOR each block with the previous cipher output; then encrypt this with the key. For the first block, XOR it with IV. Details in pages 325-326 Ch.12 of the textbook) b. Suppose Alice computes the Secret prefix MAC (page 322: secret prefix MAC(x) = h(key || x)) for the message ”AM” (in ASCII) with key “G” (in ASCII) that both Alice and Bob know. The hash function that is used is h(x1x2x3)= g(g(x1 XOR x2) XOR x3 ) where each xi is a character represented as 8 bits, and g(x) is a 8-bit string that is equal to the complement of bits in x. For example, g(10110011) = 01001100. The MAC is 8 bits. (8-bit ASCII representation of the characters is given below.) What is the…Description Find the sum of 10.2510 and 5.2510 using the 14-bit "simple" floating-point model. Hint: Refer to slides or class notes for a similar example.Q2: Write a Assembly language program that copies the BYTES from array V1 to array V2 using indexed addressing, PTR Operator and LOOP such that after execution of your code the elements of V2 will become [78h, 56h, 34h, 12h, 21h, 43h, 65h, 87h]. The data is given in the data segment below .data v1 DWORD 12345678h, 87654321h
- 11. Perform each of these operations using the bases shown. a. 32five x 4five b. 32five divide 4five c. 43six x 23six d. 143five divide 3five e. 10010two divide 11two f. 10110two x 101twoYou are given the following function moveIndexes, where NR and NC are numerical constants. The function receives as parameters rp and cp, two pointers to int. The goal of the function is to modify the values pointed by rp and cp as follows: if rp and cp originally point to the indexes of a certain cell of the matrix, after function invocation they must point to the indexes of a cell at a distance delta from the original one. int moveIndexes (int M[NR] [NC], int *rp, int *ocp, int delta) ( int i, j, *p, *p0; i = *rp; j = *cp; if (i=NR |l j=NC) return l; // error - nothing done p0 = & (M[0] [0]); p = & (M[i][j]); p = p+delta; if (p & (M[NR-1] [NC-1])) return 1; // error nothing done *rp = (p - p0) / NC; *cp = (p - p0) & NC; return 0;Problem 1. We usually write numbers in decimal form (or base 10), meaning numbers are composed using 10 different "digits" {0, 1,..., 9). Sometimes though it is useful to write numbers hexadecimal or base 16. Now there are 16 distinct digits that can be used to form numbers: {0, 1, ..., 9, A, B, C, D, E, F) where A, B, C, D, E and F represent digits with values 10, 11, 12, 13, 14 and 15, respectively. So for example, a 3 digit hexadecimal number might be 2B8 = 8 + (B) 16+ (2) 16² = 8+ (11) 16+ (2) 16² = 696. (a) How many 2-digit hexadecimals are there in which the first digit is E or F? Explain your answer in terms of the additive principle (using either events or sets). (b) Explain why your answer to the previous part is correct in terms of the multiplicative principle (using either events or sets). Why do both the additive and multiplicative principles give you the same answer? (c) How many 3-digit hexadecimals start with a letter (A-F) and end with a numeral (0-9)? Explain. (d) How…
- 5. Hamming Codes a) Suppose we want an error correcting code that will allow all single-bit errors to be corrected for memory words of length 15. How many check bits are necessary? b) Suppose we are now working with memory words of length 8. We have already calculated that we need 4 check bits, and the length of all codewords will be 12. We now receive the following code word: 010011011111 Is this a legal codeword, assuming even parity? If not, where is the error?You are writing code that is equivalent to: X = A / (5 + B) Assume signed bytes and the following first 3 lines of code: mov al,A mov bl,B add bl,5 What is the one line of code that will perform the division correctly?14. For this question, mark all answers that apply. Assuming that i, j, and k are all 32-bit int and a, b, and c are all normal 32-bit float, and that no values go out of range, which of the following must be true? a* (b*c) = (a*b)*c If a>0 and b>0, then (a+b) >a i+(j+k) i*(j*k) (i+j)+k == == == (i+j)+k (i*j)*k k+(j+i)
- Example: Assuming m-7 bits and using three of those bits for representing the fractional part, ( 1100.000 )2 ( 0110.000 )2 ( 0011.000 )2 ( 0001.100 )2 ( 0000.110 )2 ( 0000.011 )2 (12)10 %3D (12)10 / 2 (6)10 (6)10 /2 (3)10 (3)10 /2 (1.5)10 (1.5)10 / 2 (0.75)10 (0.75)10 / 2 (0.375)10 In this case, each successive division by two has shifted the binary sequence to the right by one bit.1. Consider the applications of the following number systems and explain why they are best suited for implementation of such systems.a) Binaryb) Octalc) Decimald) Hexadecimal 2. Briefly introduce the concept of number systems with detailed explanations of 3 number systems that have been used in history. 3. Briefly describe three methods that computers can use to check for error detection if the text being transmitted is “HEY”. 4. The weighted method is ideal for decimal-to-binary conversions because of its efficiency. However, it could also be used for other bases. Briefly describe how the weighted method could be used to implement a conversion from decimal to tenary.1. TRUE OR FALSE. a) Unicode is a 8-bit code, occupying twice the disk space for text as EBCDIC would require. b) Hamming codes, used for error detection and correction, are useful for burst errors (where we could reasonably expect multiple adjacent bits to be incorrect). c) CRCs are useful for error correction. d) A byte is 8 bits, but a word may vary in size (16-bits, 32-bits, etc.) from one architecture to another. e) The largest value that a 60-bit signed binary integer can represent is (260 -1). f) An Excess-M integer representation includes more negative numbers than it does positive ones.