Preview

Nt1330 Unit 1 Research Paper

Powerful Essays
Open Document
Open Document
4285 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Nt1330 Unit 1 Research Paper
AS Computing
Module CG1.3

Data Types and
Data Structures

Page Index to sections in CG1.3 Data types & data structures

Describe the different primitive data types: Boolean, character, string, integer and real
3
Describe the storage requirements for each data type
3
Describe the manipulation of records and arrays up to two dimensions
8
Identify and justify the correct data structure (record or array) for a given situation
10

Describe the different primitive data types (Boolean, character, string, integer and real).
Describe the storage requirements for each data type.

Introduction to Data Types
All programs of a non-trivial nature involve the storage of information (data). Each individual
…show more content…
Each character requires one byte as it is usually stored as an ASCII character. Notice that a digit such as 8 could be held as either a character, an integer or even a real. If any calculations are going to take place on the value then it should be held as either an integer or a real. If the calculation will never result in it being extremely large or gaining decimal places then an integer should be used.

4. Boolean
A boolean can only be one of two values, either true or false. A boolean only really needs one bit (an eighth of a byte) to hold true (1) or false (0) but strangely, Visual Basic uses two bytes to hold a boolean variable.

5. String
Strictly speaking a string is not a primitive data type as it is derived from the character data type. A string is simply a list of characters that allow words, sentences, etc. to be dealt with. Strings are stored in memory in one of three ways as detailed below. Some programming languages give the programmer a choice as to which they want to use. The choice often depends on the particular requirements at the time.

a) Fixed Length Strings: A fixed length string allocates a maximum length to each string. Thus if we declared a string as being length 10 then the word “Dog” would be held as:
D
O

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Check the linearity of the Black Box by connecting the DC Power Supply to the input of the Black Box, and the Multimeter to the output of the Black Box, then change the input voltage regularly and notice the changing in the output voltage of the Black Box.…

    • 237 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    SD1230 Lab 1

    • 239 Words
    • 2 Pages

    1. What is the highest number that can be stored in a byte? – 8 bytes as 11111111 or 255 in decimal.…

    • 239 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    1. One can differentiate between the terms health record and health information by identifying their main purpose in the health community. Health records are the type of information regarding family history, diagnosis, complaints, or patient’s medications. Health information requires analyzing medical information and provides protection.…

    • 211 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    · S/W Environment: Minimum one Web Browser should be installed before PC installation, Use IE 5.5 or higher, Go to Tools > Internet Options > Security tab and click on Custom Level button and make sure that under the Scripting section the Active Scripting is set to “Enable”.…

    • 1858 Words
    • 8 Pages
    Good Essays
  • Good Essays

    Nt1330 Unit 3 Case Study

    • 685 Words
    • 3 Pages

    What can you do to benefit the server: Starting off, I would take care of the chat for the server so that the environment is family friendly. Later on, I would attempt to deal with more blatant rule breakers such as hackers and or people whom abuse glitches or bugs to take advantage of anything. If anyone breaks the rules with the exception of hackers (instantly taken action against) I will first give them a verbal warning so they know they shouldn't repeat what they just did. If did again, either action or another verbal warning will be issued but the third time will call for immediate action. Considering the timezones, I can catch the more 'blatant' rule breakers whom could be ruining the experiences of players in my timezone where other staff aren't online or…

    • 685 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Binary Code

    • 597 Words
    • 3 Pages

    Remember the power supply that is inside your computer and how it sends electricity to all of the components? That electricity is what creates an on signal. The memory chips inside your computer are divided into thousands of tiny compartments called bits. Each bit has an electronic switch or gate. On means the gate is open and letting electricity go through. The computer reads on or open switches as a number 1. Closed gates are off because the electricity is blocked and cannot get through. The computer reads off bits as 0. It is by grouping these bits together to form a series of 1/0 commands, that data is formed. Eight bits are grouped together to form a byte. In this group of eight, there are 256 possible combinations of 1/0. The grouping of 1/0 within a byte is called Binary Code.…

    • 597 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Quantum Computing

    • 11269 Words
    • 46 Pages

    bits one can store numbers from 0 to 2L − 1. The memory of a modern computer contains of the order…

    • 11269 Words
    • 46 Pages
    Powerful Essays
  • Good Essays

    comp systems engineering

    • 3587 Words
    • 15 Pages

    of memory addresses as pointers to simplify the representation of complex information types. The next topic is the…

    • 3587 Words
    • 15 Pages
    Good Essays
  • Satisfactory Essays

    • A character constant is a single character enclosed in single or double quotation marks. • The assembler converts it to the equivalent value in the binary code ASCII:…

    • 2591 Words
    • 11 Pages
    Satisfactory Essays
  • Powerful Essays

    Binary Information

    • 2445 Words
    • 10 Pages

    2. Discuss how computer represents data and basic units of measuring information (up to GB):…

    • 2445 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    NOTES

    • 327 Words
    • 2 Pages

    2.1 Basic Logic Gates: Logic symbols and truth table of all gates: AND, OR, NOT,…

    • 327 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Java Language

    • 2935 Words
    • 12 Pages

    A String is a series of characters, example [‘h’,’e’,’l’,’l’,’o’]. In Java, string is an object. The Java platform has String class to create and manipulate strings in a Java application. To create a string, write…

    • 2935 Words
    • 12 Pages
    Powerful Essays
  • Satisfactory Essays

    notes on arrays

    • 326 Words
    • 2 Pages

    DERIVED DATA TYPES: REFERENCES, ARRAYS AND POINTERS Krishna M. Singh Department of Mechanical and Industrial Engineering Indian Institute of Technology Roorkee Roorkee 247667 Reference: Deitel and Deitel. C++ : How to Program. Prentice Hall, 2008 Krishna M. Singh, Department of Mechanical & Industrial Engineerig, IIT-Roorkee 1 Fundamental Data Types Basic Types: Boolean, character, integer and floating point types. Additional Types: void : To signify absence of information void f() // function f() does not return a value void *pv; // pointer to object of unknown type enumeration (enum): To represent specific set of values.…

    • 326 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Data is organised before processing on a computer. Data can be arranged in a variety of…

    • 22116 Words
    • 89 Pages
    Better Essays
  • Good Essays

    Ans. Unary operators work on a single operand eg. ++a while binary operators work on two operands eg. a+b…

    • 1978 Words
    • 8 Pages
    Good Essays

Related Topics