Skip to main content

ads1

Chapter 4 :- Memory, Storage Devices and Data Representation

 Chapter 4 :- Memory, Storage Devices and Data Representation 







Summary 

Memory is a part of computer where data and instructions are stored. A computer deals with different type of memories. Two major types of computer memories are (i) primary (main) memory and (ii) secondary (auxiliary) memory.

Information in a memory of a digital computer is stored in form of binary digits (0 and 1).A group of 8 bits is known as byte.

Primary Memory :- Primary memory, also known as main memory  It is made of larger number of cells. Each cell is identified by a number called an address of the cell. This is known as Random Access Memory (RAM)

FIFO Stand for :- First in First Out 

LIFO Stand for :- Last in First Out 

RAM is volatile memory. There are two basic types of the RAM. The first one is static and second is dynamic. Dynamic RAM (DRAM) needs to be refreshed thousands of times per second. Static RAM (SRAM) docs not need to the refreshed.


Computers also contain Read Only Memory (ROM) which are used to permanently record data and instructions.

A variation of a ROM is a Programmable Read Only Memory (PROM)

There is a special type of PROM called Erasable PROM (EPROM). Erasable PROM (EEPROM). EEPROMS are very useful in manufacturing

Secondary Memory Primary memory is generally costly and has capacity limitation. The popular secondary storage devices are hard disk, compact disks (CDs), digital versatile disks (DVDs), and pen drives. Secondary memory is not directly accessible to processor of a computer but requires use of computer's input/output channels.

Binary Number System The binary number system has two symbols 0 and 1. Single binary digit is called a bit

Choose the most appropriate option from those given below :

1.What is an alternative name of a primary memory? 

(a) Volatile 

(b) Permanent 

(c) Auxiliary 

(d) Any of these


2. For what amount of time does a secondary memory retain its content ? 

(a) Short duration 

(b) Long time 

(c) Never 

(d) Any of these 

 

3.Which of the following is the unit of computer memory? 

(a) Bit 

(b) Pit 

(c) Chit 

(d) Kit 


4.How many bits form a byte ? 

(a) 4 

(b) 8

(c) 16 

(d) 32 


5.Which of the following is a correct example of a LIFO ? 

(a) A queue of people 

(b) Cars waiting for service 

(c) Pile (tray) of paper 

(d) Jobs waiting for services


6.Which of the following mechanism is used to erase content of An EPROM ? 

(a) ultraviolet light 

(b) electric signal 

(c) laser technology 

(d) magnetic field


7. Which of the following type of memory is used by pen drives? 

(a) RAM 

(b) PROM 

(c) EEPROM 

(d) Any of these 


8. Which of the following is a small and high speed memory within the computer central processing unit ? 

(a) Secondary 

(b) Auxiliary 

(c) Cache 

(d) ROM


9.Which of the following is not a secondary storage device ? 

(a) Cache memory 

(b) Compact disks 

(c) DVDs 

(d) Pen drives 


10.  Which of the following number system is most suitable for basic computer data 

representation into machine readable form ? 

(a) Binary 

(b) Octal 

(c) Ternary 

(d) Hexadecimal


11. Which of the following number systems has 2 symbols 0 and 1 ? 

(a) Decimal 

(b) Binary 

(c) Hexadecimal 

(d) Octal 


12. Which of the following method is used to represent an integer number into computer 

memory? 

(a) Sign magnitude method 

(b) l's complement method 

(c) 2's complement method 

(d) All of these


13.Which of the following method is used to represent characters into computer  memory? 

(a) ASCII 

(b) Unicode 

(C) EBCDIC 

(d) All of these 


ads2

Popular posts from this blog

11. Write a Java program to input basic salary of an employee and calculate its Gross salary according to following:

    11. Write a Java program to input basic salary of an employee and calculate its Gross salary according to following: Basic Salary <= 10000 : HRA = 20%, DA = 80% Basic Salary <= 20000 : HRA = 25%, DA = 90% Basic Salary > 20000 : HRA = 30%, DA = 95% Static Solution :-  class salary {     public static void main(String args[])     {     double basic=20000.50,gross,da,hra;     if(basic <=10000)     {         da = basic * 0.8;         hra = basic *0.2;     }              else if(basic <=20000)     {         da = basic * 0.9;         hra = basic *0.25;     }     else     {         da = basic * 0.95;         hra = basic * 0.3;     }     gross = basic + da + hra;     System.out.println("The Gross Salary is :-"+gross);     } } Output :-  Dynamic Solution :-  class salary {     public static void main(String args[])     {     double basic=20000.50,gross,da,hra;     Scanner in = new Scanner(System.in);     System.out.println("Enter the Basic Salary

1. Given the school result data, analyses the performance of the students on #different parameters, e.g subject wise or class wise.

1. Given the school result data, analyses the performance of the students on #different parameters, e.g subject wise  or class wise. Solution :-   # x-axis is shows the subject and y -axis # shows the markers in each subject # import pandas and matplotlib  import pandas as pd  import matplotlib.pyplot as plt # Simple Line Chart with setting of Label of X and Y axis, # title for chart line and color of line  subject = ['Physic','Chemistry','Mathematics', 'Biology','Computer'] marks =[80,75,70,78,82] # To draw line in red colour plt.plot(subject,marks,'r',marker ='*')     # To Write Title of the Line Chart plt.title('Marks Scored') # To Put Label At Y Axis plt.xlabel('SUBJECT')           # To Put Label At X Axis plt.ylabel('MARKS')             plt.show() Output :- 

24.Create a Data Frame quarterly sales where each row contains the item category, item name, and expenditure. Group the rows by the category and print the total expenditure per category.

24.Create a Data Frame quarterly sales where each row contains the item category, item name, and expenditure. Group the rows by the category and print the total expenditure per category. import pandas as pd  # initialize list of lists data = [['CAR','Maruti',1000000],['AC','Hitachi',55000],['AIRCOLLER','Bajaj',12000], ['WASHING MACHINE','LG',15000],['CAR','Ford',7000000],['AC','SAMSUNG',45000],['AIRCOLLER','Symphony',20000],['WASHING MACHINE','Wirlpool',25000]] Col=['itemcat','itemname','expenditure'] # Create the pandas DataFrame qrtsales = pd.DataFrame(data,columns=Col) # print dataframe.  print (qrtsales) qs=qrtsales.groupby('itemcat')  print('Result after Filtering Dataframe')  print(qs['itemcat','expenditure'].sum()) Output :-