(Practice) Although the total number of bytes varies from computer to computer, memory sizes of millions and billions of bytes are common. In computer language, the letter M representsthe number 1,048,576, which is 2 raised to the 20th power, and G represents 1,073,741,824, which is 2 raised to the 30th power. Therefore, a memory size of 4 MB is really 4 times 1,048,576 (4,194,304 bytes), and a memory size of 2 GB is really 2 times 1,073,741,824 (2,147,483,648 bytes). Using this information, calculate the actual number of bytes in the following:
a. A memory containing 512 MB
b. A memory consisting of 512 MB words, where each word consists of 2 bytes
c. A memory consisting of 512 MB words, where each word consists of 4 bytes
d. A thumb drive that specifies 2 GB
e. A disk that specifies 4 GB
f. A disk that specifies 8 GB
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
C++ for Engineers and Scientists
- Computer Science The computer science department would like to create an analog clock with the numbers for the hours shown in binary. Due to space concerns, each hour should show the same number of digits with preceding zeros. What is the max number of digits per hour that they would need to show all the binary numbers on the clock? How did you come up with the solution?arrow_forward(Amdahl’s law question) Suppose you have a machine which executes a programconsisting of 50% floating point multiply, 20% floating point divide, and the remaining 30% are fromother instructions.(a) Management wants the machine to run 4 times faster. You can make the divide run at most 3 timesfaster and the multiply run at most 8 times faster. Can you meet management’s goal by making onlyone improvement, and which one?arrow_forward(C PROGRAMMING ONLY) 4. Breaking the Codeby CodeChum Admin ATTENTION SOLDIER! This will be the hardest mission of your life. Our intelligence department has caught the enemy sending codes from one base to another. These enemy codes can either be a simple communication message or a mastermind plan. Our intelligence department has determined that a mastermind plan is a code that has at least 1 consonant character. Since you know programming, your task is to check a code if it is a mastermind plan or not. Instructions: In the code editor, you are provided with a main() function that asks the user for a code. Furthermore, there is a call to the function, hasConsonant().Your task is to declare and define this hasConsonant() function which has the following details:Return type - intName - hasConsonantParameter:char* - to hold the character arrayReturn value - 1 if there is at least 1 consonant and 0 if there is none. Be sure to consider both the capital and small letter consonants…arrow_forward
- Subject: Computer Organization and Architecture 1barrow_forward(Don't copy) explain pleasearrow_forward(xiii) Determine all the permutations of the numbers less than or equal to some given number n. For example, if n = 123, then the permutations are: 123 321 231 132 213 312 (xiv) Find a series of five consecutive numbers, the sum of the squares of the first three of which is equal to the sum of the squares of the last two. For example, (– 2)2+ (– 1)2+ 02= 12+ 22 (xv) Limit the checking within 1000, to show all the triad numbers within 10,000. A number is said to be a triad number if the double and triple of the number contain all separate digits with no repetition of any one of them. (xvi) Identify and show the integer values of x, y, and z that satisfy the equation: Z²= X²+ y²arrow_forward
- 1. (a) What is the machine representation of 3/7 in double precision format (M = 11, N = 52)? (b) Suppose you use double precision floating point arithmetic with round to even rule. What is x – fl(x) for x = 234 + 2-8+2-16 + 2-24? %3Darrow_forward3.arrow_forward(C PROGRAMMING ONLY) 4. Swapping Placesby CodeChum Admin Phew! Thanks to your help, I was able to entertain the two bored guys. But I would like to ask for your help one last time. I see that there are is this older guy who's bullying a kid. I can reprimand the older guy but I want to handle this situation peacefully. I'm planning to swap the kid's place to another older guy's place so the bully won't be close to the kid. Please help me swap them both. Instructions: You are given a main() function that asks the user for two integer inputs and passes these two values to a function call of the swap() function.The swap function doesn't exist yet so your task is to make its function declaration and implement its function definition.Its details are the following:It accepts two integer addresses as its parametersIt will swap the values found in the two integer addresses. For example, if we have two integer values, a = 5 and b = 10, and we pass their addresses to the function call, by…arrow_forward
- In Computer Organization and Assembly Language, use MIPS to write the following code in the Mars simulator. Take two float numbers from the user and perform all arithmetic operations.arrow_forwardH.W:- Find the value of Z Where Z=AX+BX+CX*DX, IF AX=4,BX=8,CX-2,DX-3 result in memory location (DS:1200H] IF DS=2000H? Alo Mor A+, 2000 Narrow_forwarda) In a Digital Logic examination, you are given two signed integers in different number systems. A= (72)16 B= -(101)8 Determine their values in the decimal system b) Find the value of n, the shortest word-length of a computer using two’s complement representation, which can represent all these numbers and state the largest and smallestnumber that can be represented. c) Give the n-bit two’s complement representations of the two numbers, where n is value determined in b.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr