Preview

Data Types

Good Essays
Open Document
Open Document
1808 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Data Types
LECTURE 1
DATA TYPES
Our interactions (inputs and outputs) of a program are treated in many languages as a stream of bytes. These bytes represent data that can be interpreted as representing values that we understand. Additionally, within a program we process this data that can be interpreted as representing values that we understand. Additionally, within a program we process this data in various way such as adding them up or sorting them. This data comes in different forms. Examples include: your name which is a string of characters; your age which is usually an integer; or the amount of money in your pocket which is usually a value measured in dollars and cents (something with a fractional part). A major part of understand how to design and code programs in centered in understanding the types of data we want to manipulate and how to manipulate that data.
A type defines a set of values and a set of operations that can be applied on those values. The set of values for each type is known as the domain for that type. The four major families of data include:
• Nothing
• Integer
• Floating-point
• Complex
The C++ programming language identifies five data types as standard data types:
• Void
• Boolean
• Character
• Integer
• Floating-point
The standard data types and the complex data types within C++ have a series of attributes, which include:
• C++ Reserved or Key Word
• Domain – the allowed values
• Signage – do they allow negative numbers or only positive numbers
• Meaning – i.e What do they represent
• Rules of Definition – What special characters indicate the data type
• Size – in terms of the number of bytes of storage used in the memory
• Operations Allowed – i.e. Which operators can I use on the data type
Family Data Type Reserved Word Represents Standard Type
Nothing Null or nothing void No data Yes
Integer Boolean bool Logical true and false Yes
Integer Character char Single characters Yes
Integer Integer int Whole numbers Yes

You May Also Find These Documents Helpful

  • Powerful Essays

    1. One megabyte equals approximately 1) 1,000 bits 2) 1,000 bytes 3) 1 million bytes 4) 1 million bits 5) 2,000 bytes 2. Data going into the computer is called? 1) Output 2) Algorithm 3) Input 4) Calculations 5) Flowchart 3. Which of the following refers to the memory in your computer? 1) RAM 2) DSL 3) USB…

    • 5339 Words
    • 22 Pages
    Powerful Essays
  • Better Essays

    Nt1310 Unit 1 Assignment

    • 1994 Words
    • 8 Pages

    * The binary numbering system plays a central role in how information of all kinds is stored on the computer. Understanding binary can lift a lot of the mysteries from computers because at a fundamental level they're really just machines for flipping binary digits on and off. There are several activities on binary numbers in this document, all simple enough that they can be used to teach the binary system to anyone who can count! Generally children learn the binary system very quickly using this approach, but we find that many adults are also excited when they finally understand what bits…

    • 1994 Words
    • 8 Pages
    Better Essays
  • Satisfactory Essays

    ITT Tech MA3110 Vocab 1

    • 539 Words
    • 3 Pages

    Categorical Data – data that can be separated into different categories that are distinguished by some nonnumeric characteristic.…

    • 539 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Unit 18 - Database P1, M1

    • 995 Words
    • 4 Pages

    Data type is the type of content and it decides the content can be input and the file size.…

    • 995 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    NT1110

    • 315 Words
    • 2 Pages

    Chapter two discusses the understanding of computer, math, and measurements. Also, it shows you how we use computer math with computer hardware and systems. Some of these concepts are bits versus bytes, binary versus decimal, Boolean operators, hertz, and data transfer. The chapter two also shows numbering systems used in computers. These are some importance skills that will help you in the computer field.…

    • 315 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Data Base

    • 2312 Words
    • 10 Pages

    * Each value manipulated by an Oracle database possesses a data type. The data type of a value links a selection of attributes to the value. These attributes of the value differentiate one data type from the others. Oracle treats certain data types in a distinct way. For instance, one can add values of NUMBER data type, but not values of RAW data type. When one builds a table or a cluster, one must assign data types for all its columns. In Oracle, the arguments of a procedure or stored function also need to be allocated data types. The data types specify the domain of values which…

    • 2312 Words
    • 10 Pages
    Good Essays
  • Powerful Essays

    Project Plan Inception

    • 1688 Words
    • 7 Pages

    of a characteristic and Variables data that can be specific measurement. The descriptions of the two types are as followed:…

    • 1688 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    Ipt Hsc Notes

    • 11818 Words
    • 48 Pages

    Number media types is used to represent integers (whole numbers), real numbers (decimals), currency, Boolean and dates and times.…

    • 11818 Words
    • 48 Pages
    Powerful Essays
  • Powerful Essays

    A characteristic, for example; a field has many attributes such as data like numbers or letters. Attributes can be used as a synonym for a “field”. In DOS systems, each files has an attribute, each file has many properties that shows if the file is “read only”, visible or encrypted.…

    • 1351 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    h) Data Type: A detailed coding scheme recognized by system software, such as DBMS, for representing organizational data.…

    • 455 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Programming is an innovative undertaking through which programmers use computers to carry out tasks and solve problems. Programming paradigms are the various approaches to programming. Two of the most fundamental programming paradigms include object-oriented programming as well as procedural programming. Object-oriented programming employs the interaction of objects in the problem solving process. Objects are components within a program that are developed to perform a particular function and to connect with other elements within the program. Procedural programming on the other hand makes use of a list of directives that instruct a computer how to solve a particular problem on a step by step basis.…

    • 372 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    The SDLC Process

    • 907 Words
    • 4 Pages

    One of the key principle ideas behind the creation of classes in data abstraction the data type is less important than the operations that can preformed on it in a sense the data type is hidden behind a limited number of functions method…

    • 907 Words
    • 4 Pages
    Good Essays
  • Good Essays

    This example uses the length property of the String object to find the length of a string:…

    • 732 Words
    • 3 Pages
    Good Essays
  • Good Essays

    1.2 Write a Java program to display default value of all primitive data types of…

    • 2916 Words
    • 12 Pages
    Good Essays
  • Good Essays

    Most fundamental data types have pre-defined operators associated with them. For example, the C++ data type int, together with the operators +, -, *, and /, provides an implementation of the mathematical concepts of an integer. To make a user-defined data type as natural as a fundamental data type, the user-defined data type must be associated with the appropriate set of operators.…

    • 519 Words
    • 3 Pages
    Good Essays

Related Topics