Question

In: Computer Science

1. What is the structure data type in C? 2. What is the value ranges of...

1. What is the structure data type in C?

2. What is the value ranges of data type of unsigned char, unsigned short, respectively?

3. How many regular resisters are in this X-CPU?

4. How does the X-CPU access the memory?

5. What is the maximum memory address?

6. Which statements in the code is to increase the PC value?

7. What is the minimal cycle number that is just needed to print “Hello world!” 4 times?

8. what is the minimal cycles number do that is just needed to print ONE “Hello world!” once?

Solutions

Expert Solution

1.

Structure is a client characterized datatype in C language which permits us to join information of various sorts together. Structure assists with building an unpredictable information type which is more significant. It is to some degree like an Array, yet a cluster holds information of comparative kind as it were. However, structure then again, can store information of any sort, which is viable more valuable.

For instance: If I need to compose a program to store Student data, which will have Student's name, age, branch, perpetual location, father's name and so forth, which included string esteems, whole number qualities and so on, how might I use clusters for this issue, I will require something which can hold information of various sorts together.

In structure, information is put away in type of records.

2

Type    Storage size

Worth reach

unsigned char   1 byte    0 to 255

unsigned short    2 bytes    0 to 65,535

3

In registering, a memory address is a reference to a particular memory area utilized at different levels by programming and equipment. Memory addresses are fixed-length groupings of digits expectedly showed and controlled as unsigned integers.The most extreme arbitrary access memory (RAM) introduced in any PC framework is restricted by equipment, programming and monetary elements. The equipment may have a predetermined number of address transport bits, restricted by the processor bundle or plan of the framework. A portion of the location space might be shared between RAM, peripherals, and read-just memory. On account of a microcontroller with no outer RAM, the size of the RAM exhibit is restricted by the size of the incorporated circuit kick the bucket. In a bundled framework, just enough RAM might be accommodated the framework's necessary capacities, with no arrangement for expansion of memory after assembling.

The 1620 utilized 5-digit decimal locations, so in principle the most elevated conceivable location was 99,999. Practically speaking, the CPU upheld 20,000 memory areas, and up to two discretionary outside memory units could be included, each supporting 20,000 locations, for a sum of 60,000 (00000–59999).

There is two memory model where a memory address maps into the physical location space:

The level model where the physical location space and direct location space are the equivalent

The divided model where the physical location space is part into portion making a coherent location space for each section

4 - CPU

Intel 64 engineering upholds physical location space more noteworthy than 64 GBytes;

The genuine physical location size of IA-32 processors is usage explicit. In 64-digit mode, there is engineering support for 64-cycle direct location space. In any case, processors supporting Intel 64 design may actualize under 64-bits (see Section 3.3.7.1). The direct location space is planned into the processor physical location space through the PAE paging system.

5 - Maximum Size

The greatest size of the physical memory is restricted by:

the width of the location transport

the unit of capacity of a location. ie if a location store:

a byte (generally normal)

or then again a word (old, old)

Estimation Example:

Computer processor word size   Address transport size   Number of memory locations   Memory Storage by location   Addressable memory space

32 bit   32-bit   232=4,294,967,296   1 byte   4,294,967,296/1024/1024/1024=4 GB

64-bit (8 bytes)   64-bit   264   1 byte   264/1024/1024/1024=17,179,869,184 Gb. It is a 11-digit number in Gb

8-bit   20-bit (for example Intel 8086)   220=1,048,576   1 byte   1 Mib

36-bit   18-bit   218=262,144   1 word   262,144.36=1,179,648bytes=1152K

5

the CPU gets to memory as indicated by an unmistakable progression. Regardless of whether it originates from perpetual capacity (the hard drive) or info (the console), most information goes in irregular access memory (RAM) first. The CPU at that point stores bits of information it should get to, regularly in a reserve, and keeps up certain unique directions in the register. We'll discuss reserve and registers later.

You turn the PC on.

The PC loads information from read-just memory (ROM) and plays out a force on individual test (POST) to ensure all the significant parts are working appropriately. As a major aspect of this test, the memory regulator checks the entirety of the memory addresses with a snappy read/compose activity to guarantee that there are no mistakes in the memory chips. Peruse/compose implies that information is kept in touch with a piece and afterward read from that bit.

The PC stacks the fundamental info/yield framework (BIOS) from ROM. The BIOS gives the most essential data about capacity gadgets, boot arrangement, security, Plug and Play (auto gadget acknowledgment) ability and a couple of different things.

The PC stacks the working framework (OS) from the hard crash into the framework's RAM. By and large, the basic pieces of the working framework are kept up in RAM as long as the PC is on. This permits the CPU to have quick admittance to the working framework, which improves the exhibition and usefulness of the general framework.

At the point when you open an application, it is stacked into RAM. To ration RAM utilization, numerous applications load just the fundamental pieces of the program at first and afterward load different pieces varying.

After an application is stacked, any records that are opened for use in that application are stacked into RAM.

At the point when you spare a record and close the application, the document is kept in touch with the predetermined stockpiling gadget, and afterward it and the application are cleansed from RAM.

6. the inreament administrator is ised to build the program counter an incentive by 1(i++/i+1)( until the condition staisfies)

for eg

for(i=0;i<5;i++){

explanation;

}

7

to print multiple times the circle ought to execute minimim multiple times

8

to print 1 time the circle shouls must run atleast one time.


Related Solutions

Name the data type,value type and array size / name of the followings. 1) 20.4 2)...
Name the data type,value type and array size / name of the followings. 1) 20.4 2) a=5 3) [2 3 8] 4) ' 7 ' 5) ' abc' 6) pi 7) b=true 8) 20+2i 9) [ 'a' 'b' 'c' ] 10) [ 'a' ; 'b' ] 11) [1 2 ;4 5;7 8] 12) [20,21,22,23] 13) c= [a;b] 14) c= [b:a] 15) d=[b:a ; b:a] 16) magic(3) 17 uint8(20) 18) int8(d)
Create your own data type using a C++ structure. Assign values to a variable of that...
Create your own data type using a C++ structure. Assign values to a variable of that data type. Retrieve values from the variable of that data type. Description: In this lab you will choose the statements to create a program that: Creates a brand new data type called "Monster". Once created, creates a variable of type Monster and assign values to the variable and then display the contents. This lab will again take the form of a guided multiple-choice quiz...
1. how capital structure affects the value of a firm? 2. what are the Modigliani and...
1. how capital structure affects the value of a firm? 2. what are the Modigliani and Miller’s capital structure theories? 3 What have been the trends for dividend payments and stock buybacks (repurchases) over the past 25 years? 4 How do employee stock programs dilute the ownership of other stockholders? How do stock repurchases neutralize this effect? 5 What is rule 10b-18, what is its major provisions, and what is the goal of the rule? 6 Why is it important...
Answer the following: 1. What is Econometrics? 2. What is the Structure of Economic Data 3....
Answer the following: 1. What is Econometrics? 2. What is the Structure of Economic Data 3. What are the steps in Econometric Modelling 4. What are the steps in Empirical Economic Analysis 5. Definition of the Simple Regression Model 6. What is the Interpretation of Regression Output 7. Define OLS
Designing and implementing a C++ structure data type - Monthly Budget Remember to use correct code...
Designing and implementing a C++ structure data type - Monthly Budget Remember to use correct code formatting and documentation. A student has established the following monthly budget: Budget Categories       Budgeted amount ----------------------------------------------------- Housing                  $ 580.00 Utilities                   $ 150.00 Household Expenses    $ 65.00 Transportation           $ 50.00 Food                      $ 250.00 Medical                  $ 30.00 Insurance                $ 100.00 Entertainment           $ 150.00 Clothing                  $ 75.00 Miscellaneous           $ 50.00 ---------------------------------------------------- Write a program that declares a MonthlyBudget structure designed with member variables to hold each of these expense categories. The program should define two MonthlyBudget structure variables...
1.what is the difference between type 1 and type 2 duabetes mellitus?2. what are...
1. what is the difference between type 1 and type 2 duabetes mellitus?2. what are the differences between their signs and symptoms of Diabetes mellitus type 1 and 2?3. Is hypoglycemia ONLY MANIFESTED IN patient who has TYPE 1 Diabetes Mellitus, or could also be for TYPE 2
1) What is the mode, and with what type of data is it most appropriate? What is the median and with what type of data is it most appropriate?
1) What is the mode, and with what type of data is it most appropriate? What is the median and with what type of data is it most appropriate? What is the mean, and with what type of data is it most appropriate? 2) For the following data, indicate which measure of central tendency you should compute. a. IQ scores b. Anxiety scores (which are skewed in the population) c. Blood types d. Course grades (e.g., A, A-, B+, B, etc.) 3) The...
1. Describe the pathophysiology related to acid-base imbalance. 2. What are the expected reference ranges for...
1. Describe the pathophysiology related to acid-base imbalance. 2. What are the expected reference ranges for arterial blood gas values? PACO2 = HCO3 = You already know that the ph of blood is 7.35-7.45 3. What possible medical conditions could cause the following acid-base imbalance conditions? Provide an evidence-based rationale to support your response (example, something like this: Metabolic alkaloisis is seen in patients with ___________. This happens because the _____can't ____________ because of ____________ .) ○ Metabolic alkalosis ○...
Given the following data, what is the value of ΔGf° (CH3OH(ℓ) at 25°C? CO(g) + 2...
Given the following data, what is the value of ΔGf° (CH3OH(ℓ) at 25°C? CO(g) + 2 H2(g) ⇄ CH3OH(ℓ)   K = 1.081 × 10-40 ΔGf°(CO) = -137.2 kJ/mol
In C++ Write the definition for following methods of List data structure. 1. setList – The...
In C++ Write the definition for following methods of List data structure. 1. setList – The function set the value of list elements equal to a value passed as the function input. 2. getAt – The function returns an element of the list referred by its position which is given to the function as input. 3. insertAt – The function inserts a given element passed as function input in the list at the specified position also passed as second function...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT