In: Computer Science
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?
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.