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

    Network Attached Storage (NAS) is a type of file-level storage device which is dedicated and designed to provide users with fast and secure access to their data at all times over LAN and Ethernet connections. NAS’s are normally a specialized computer built to store and serve files quickly. The Capacity for NAS’s is limitless. Low end Network Attached Storage units start at around $300 and can store over 5 Terabytes. The Picture on the right is of a Netgear ReadyNAS 312 RN31200 and can hold 8TB.…

    • 291 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 1 Question Paper

    • 4923 Words
    • 20 Pages

    The size parameter reset the default buffer size but did not disable access to the…

    • 4923 Words
    • 20 Pages
    Good 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

    If you are looking for an superior processor for your personal computer build, you would have to look no further than the great processors of our day. Advanced Micro Devices (AMD) and Intel are two of the major manufacturers of these processors. Many people ask the question, “Which processor should I buy for the best price?” This is a hard question to answer, but we will attempt to answer that question by looking at two processors that are of great value for the budget price. Also, someone may ask, “Which processor will I go with? The Intel Core i3-4170 is a good choice processor that has some awesome perks, however the AMD FX- 4350 beats it in almost every aspect as a good quality processor for the price.…

    • 373 Words
    • 2 Pages
    Satisfactory 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • Better Essays

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

    • 22116 Words
    • 89 Pages
    Better 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
  • 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

Related Topics