(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
- (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_forward3. (a) Order the following functions by growth rate in ascending order: n, n'5, 1.1", n log(n"), 0.999", log n, logn, n 100arrow_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(41D00000)16 is Represented in IEEE single precision notation. It's decimal value isarrow_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_forward
- Please explain to me in detail what this code does, I don’t understand :,)arrow_forwardQ1) Consider a simple traffic light system to regulate safe pedestrian crossing on a busy lane. Consider the following system requirement:(SysReq:)The traffic lights shall allow pedestrians to safely cross the lane by stopping cars together with the following software requirements: (SofReq1:)The light switch for pedestrians will be set to 'green' within x seconds after the pedestrian button has been pressed. (SofReq2:)The light switch for cars will be set to 'red' at least y seconds before the light switch for pedestrians is set to 'green'. Find missing environment assumptions and domain properties that are necessary to build the following satisfaction argument: {SofReq1, SofReq2, assumptions?, domain properties?} =SysReq Are the missing domain properties adequate? Are the missing assumptions realistic?arrow_forward(Python) It is often claimed that passwords do not get saved as plaintext anywhere in systems, and even the system administrator does not know your password. Given what you learned about hash functions. Explain how such a claim is possible. In other words, how do systems perform authentication without having to store passwords in a format that can be read by the system administrators? Authentication is primarily the process of verifying that provided password is correct. Provide a pseudo code for the function login: def signup(username, password):'''store the user credential so that the system knows how toauthenticate the user in the future (when login() gets called).'''def login(username, password):'''returns True, if the provided username and password are correct'''arrow_forward
- 2.) Q = {A, B} S = {a,b,c,d,e,f...z} qi = {A} F = {B} P = state A B a,b,c,d,e,f...y A B 28 B Barrow_forward- In molecular biology, DNAS and proteins can be represented as a sequence of alphabets. DNA sequences consist of A, T, G, C representing nucleobases adenine, thymine, guanine and cytosine. Proteins consist of 20 different letters indicating 20 different amino acids. Suppose you are going to be recruited as a research fellow in a Bio-informatics lab where the recruiters need to compare your DNA characteristics for some reasons with their most successful researcher's DNA. If they observe that highest nucleobase subsequence matching score is more than 5, primarily you will be considered as a valid candidate for their lab. Let's say the part of DNA Sequence of you and the researcher are AATTGCGG, and GACTTACGA respectively. Now your task is to find a suitable algorithm to help the recruiters to measure your eligibility, and do the necessary task to convey them the list of highest matched nucleobases.arrow_forwardLanguage :- Python Problem Statement:Given an integer N, your task is to find an NxN layout of X's and O's such that noaxis-aligned square (2x2 or larger) within the grid has the same symbol at each ofits four corners.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr