Type conversion functions

Size: px
Start display at page:

Download "Type conversion functions"

Transcription

1 20th August 2013 Type conversion functions String to Date in Datastage Transformer Functions Used in Datastage Transformer Null Handling Functions In Datastage Transformer [ praveen.com/2013/07/nullhandling functions in datastage.html] String Functions In DatastageTransformer [ praveen.com/2013/07/stringfunctions in datastage.html] Date and time functions in Datastage [ praveen.com/2012/10/date and timefunctions you can use.html] Char Generates an ASCII character from its numeric code value. You can optionally specify the allow8bits argument to convert 8 bit ASCII values. Input: code (number), [allow8bits] Output: result (char) Examples. The following example outputs the ASCII code 65 as the character A. Char(65) DateToString Returns the string representation of the given date. The format of the string can optionally be specified. Input: date (date), [format (string)] Output: result (string) Examples. The following example outputs the date contained in the column link_name.mydate to a string. If link_name.mydate contains the date 18th August, 2009, then the output string is " ": DateToString(link_name.mydate) The following example outputs the date contained in the column link_name.mydate to a string with the format dd:mm:yyyy. If link_name.mydate contained the date 18th August, 2009, then the output string would be "18:08:2009": DateToString(link_name.mydate, "%dd:%mm:%yyyy") DateToDecimal Returns the given date as a packed decimal value. If your target decimal specifies a scale, part of the date appears after the decimal point. You can optionally specify a format string that

2 specifies how the date is stored in the decimal number. The default format string is "%yyyy%mm%dd", so, for example, the date is stored as the decimal number Format strings can only specify a format that contains numbers. For example, you cannot specify a format string such as "%yyyy %mm %dd", because the hyphen character ( ) cannot be stored in a packed decimal value. The following tokens are valid for conversions to or from decimal values: %yyyy (four digit year) %yy (two digit year) %NNNNyy (two digit year with cutoff) %mm (two digit month) %dd (two digit day of month) %ddd (three digit day of year) The literal digits 0 to 9 are also valid. Input: basedate (date) [, format (string)] Output: converted_date (decimal) Examples. If the column link_name.basedate contains the date , then the following function stores the date as the decimal number : DateToDecimal (link_name.basedate, "%dd%mm%yyyy") If the column link_name.basedate contains the date , and the target column has a length of 10 and a scale of 2, then the following function stores the date as the decimal number : DateToDecimal (link_name.basedate) DecimalToDate Returns the given packed decimal as a date. Both the sign and the scale of the decimal number are ignored when it is converted to a date. You can optionally specify a format string that specifies how the date is stored in the decimal number. The default format string is "%yyyy%mm%dd", so, for example, the date is stored as the decimal number Format strings can only specify a format that contains numbers. For example, you cannot specify a format string such as "%yyyy %mm %dd", because the hyphen character ( ) cannot be stored in a packed decimal value. The following tokens are valid for conversions to or from decimal values: %yyyy (four digit year) %yy (two digit year) %NNNNyy (two digit year with cutoff)

3 %mm (two digit month) %dd (two digit day of month) %ddd (three digit day of year) The literal digits 0 to 9 are also valid. Input: basedec (decimal) [, format (string)] Output: date Examples. If the column link_name.mydecdata contains the value , then the following function returns the date : DecimalToDate (link_name.basedate, "%dd%mm%yyyy") If the column link_name.mydecdata contains the value , then the following function returns the date : DecimalToDate (link_name.basedate) DecimalToDecimal Returns the given decimal in decimal representation with precision and scale specified in the target column definition. The argument rtype optionally specifies a rounding type, and is set to one of the following values: ceil. Round the source field toward positive infinity. For example, 1.4 > 2, 1.6 > 1. floor. Round the source field toward negative infinity. For example, 1.6 > 1, 1.4 > 2. round_inf. Round or truncate the source field toward the nearest representable value, breaking ties by rounding positive values toward positive infinity and negative values toward negative infinity. For example, 1.4 > 1, 1.5 > 2, 1.4 > 1, 1.5 > 2. trunc_zero. Discard any fractional digits to the right of the rightmost fractional digit supported in the destination, regardless of sign. For example, if the destination is an integer, all fractional digits are truncated. If the destination is another decimal with a smaller scale, round or truncate to the scale size of the destination decimal. For example, 1.6 > 1, 1.6 > 1. Input: decimal (decimal) [,rtype (string)] Output: result (decimal) Examples. If the column link_name.mydec contains the decimal number , the following function returns the decimal number DecimalToDecimal(link_name.mydec,"ceil") The following function returns the decimal number DecimalToDecimal(link_name.mydec,"floor")

4 The following function returns the decimal number DecimalToDecimal(link_name.mydec,"trunc_zero") The following function returns the decimal number DecimalToDecimal(link_name.mydec,"round_inf") In all these examples, the target decimal has a length of 10 and a scale of 2. DecimalToDFloat Returns the given decimal in dfloat representation. The argument "fix_zero" optionally specifies that all zero decimal values are regarded as valid (by default, decimal numbers comprising all zeros are treated as invalid). Input: decimal (decimal) [,"fix_zero"] Output: result (dfloat) Examples. If the column link_name.mydec contains the decimal number the following function returns the dfloat number E+00. DecimalToDFloat(link_name.mydec,"fix_zero") If the column link_name.mydec contains the decimal number the following function returns the dfloat number E+04. DecimalToDFloat(link_name.mydec,"fix_zero") If the column link_name.mydec contains the decimal number the following function returns the dfloat number E+04. DecimalToDFloat(link_name.mydec,"fix_zero") If the column link_name.mydec contains the decimal number the following function returns the dfloat number E+04. DecimalToDFloat(link_name.mydec) If the column link_name.mydec contains the decimal number the following function returns the dfloat number E+04. DecimalToDFloat(link_name.mydec) DecimalToString Returns the given decimal as a string. The argument "fix_zero" optionally specifies that all zero decimal values are regarded as valid (by default, decimal numbers comprising all zeros are treated as invalid). This covers the case where the sign bits of the packed decimal representation are all 0 as well as all the content digits. This cast is not considered valid unless "fix_zero" is true.

5 Input: decimal (decimal) [,"fix_zero"] Output: result (string) Examples. If the column link_name.mydec contains the decimal number , the following function returns the string "4": DecimalToString(link_name.mydec,"suppress_zero") If the column link_name.mydec contains the decimal number , the following function returns the string " ". DecimalToString(link_name.mydec,"fix_zero") If the column link_name.mydec contains the decimal number , the following function returns the string "12344". DecimalToString(link_name.mydec,"suppress_zero") If the column link_name.mydec contains the decimal number , the following function returns the string " ". DecimalToString(link_name.mydec,"fix_zero") If the column link_name.mydec contains the decimal number , the following function returns the string " ". DecimalToString(link_name.mydec,"fix_zero") If the column link_name.mydec contains the decimal number , the following function returns the string " ": DecimalToString(link_name.mydec,"suppress_zero") If the column link_name.mydec contains the decimal number , the following function returns the string " ". DecimalToString(link_name.mydec) If the column link_name.mydec contains the decimal number , the following function returns the string " ". DecimalToString(link_name.mydec) DecimalToTime Returns the given packed decimal as a time. You can optionally specify a format string that specifies how the time is stored in the decimal number. The default format string is " %hh%nn%ss", so, for example, the time 14:03:22 is stored as the decimal number Format strings can

6 only specify a format that contains numbers. For example, you cannot specify a format string such as "%hh:%nn:%ss", because the colon character (:) cannot be stored in a packed decimal value. The following tokens are valid for conversions to or from decimal values: %hh (two digit hours using 24 hour clock) %nn (two digit minutes) %ss (two digit seconds) %ss.n (two digit seconds, plus the number of fractional digits allowed. The number of fractional digits is from one to six inclusive). The literal digits 0 to 9 are also valid. If your specified format includes microseconds (for example, %ss.4), then the position of the decimal point is inferred in the decimal value. The position of the decimal point does not have to coincide with the specified scale of the decimal (for example, scale = 4). Input: time (time) [, format (string)] Output: result (decimal) Examples: If the column link_name.mytimedec contains the decimal value , then the following function returns the time 20:06:58: DecimalToTime(link_name.mytimedec) If the column link_name.mytimedec contains the de cimal value , then the following function returns the time 20:06:58: DecimalToTime(link_name.mytimedec, "%ss%nn%hh") DecimalToTimestamp Returns the given packed decimal as a timestamp. You can optionally specify a format string that specifies how the timestamp is stored in the decimal number. The default format string is " %yyyy%mm%dd%hh%nn%ss", so, for example, the timestamp :03:22 is stored as the decimal number Format strings can only specify a format that contains numbers. For example, you cannot specify a format string such as "%yyyy/%mm/%dd%hh:%nn:%ss", because the slash character (/) and the colon character (:) cannot be stored in a packed decimal value. The following tokens are valid for conversions to or from decimal values: %yyyy (four digit year) %yy (two digit year) %NNNNyy (two digit year with cutoff) %mm (two digit month) %dd (two digit day of month)

7 %ddd (three digit day of year) %hh (two digit hours using 24 hour clock) %nn (two digit minutes) %ss (two digit seconds) %ss.n (two digit seconds, plus the number of fractional digits allowed. The number of fractional digits is from one to six inclusive). The literal digits 0 to 9 are also valid. If your specified format includes microseconds (for example, %ss.4), then the position of the decimal point is inferred in the decimal value. The position of the decimal point does not have to coincide with the specified scale of the decimal (for example, scale = 4). Input: timestamp (timestamp) [, format (string)] Output: result (decimal) Examples: If the column link_name.mytimestampdec contains the value , then the following function returns the timestamp :06:58: DecimalToTimestamp(link_name.mytimestampdec) If the column link_name.mytimestampdec contains the decimal value , Then the following function returns the timestamp :06:58: DecimalToTimestamp(link_name.mytimestampdec, "%hh%nn%ss%yy%mm%dd") DFloatToDecimal Returns the given dfloat in decimal representation. The argument rtype optionally specifies a rounding type, and is set to one of the following values: ceil. Round the source field toward positive infinity. For example, 1.4 > 2, 1.6 > 1. floor. Round the source field toward negative infinity. For example, 1.6 > 1, 1.4 > 2. round_inf. Round or truncate the source field toward the nearest representable value, breaking ties by rounding positive values toward positive infinity and negative values toward negative infinity. For example, 1.4 > 1, 1.5 > 2, 1.4 > 1, 1.5 > 2. trunc_zero. Discard any fractional digits to the right of the rightmost fractional digit supported in the destination, regardless of sign. For example, if the destination is an integer, all fractional digits are truncated. If the destination is another decimal with a smaller scale, round or truncate to the scale size of the destination decimal. For example, 1.6 > 1, 1.6 > 1. Input: number (dfloat), [rtype (string)] Output: result (decimal) Examples. If the column link_name.myfloat contains the dfloat number 2.534, the following function returns the decimal number

8 DFloatToDecimal(link_name.mydec,"ceil") If the column link_name.myfloat contains the dfloat number 2.534, the following function returns the decimal number DFloatToDecimal(link_name.mydec,"floor") If the column link_name.myfloat contains the dfloat number 2.534, the following function returns the decimal number DFloatToDecimal(link_name.mydec,"trunc_zero") If the column link_name.myfloat contains the dfloat number 2.534, the following function returns the decimal number DFloatToDecimal(link_name.mydec,"round_inf") DfloatToStringNoExp Returns the given dfloat in its string representation with no exponent, using the specified scale. Input: number (dfloat), scale (string) Output: result (string) Examples. If the column link_name.myfloat contains the dfloat number 2.534, then the following function returns the string : DfloatToStringNoExp(link_name.myfloat,2) IsValid Returns whether the given string is valid for the given type. Valid types are "date", "decimal", "dfloat", "sfloat", "int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "raw", "string", "time", "timestamp", "ustring". For data types of date, time, and timestamp, you can optionally specify a format string. The format string describes the format that your input data uses when it differs from the default formats for date, time, or timestamp. The default format for date is %yyyy %mm %dd. The default format for time is "%hh:%mm:%ss". The default format for timestamp is %yyyy %mm %dd %hh:%mm:%ss". Input: type (string), teststring (string) [, format (string)] Output: result (int8) Examples. If the column link_name.mystring contains the string "1", then the following function returns the value 1. IsValid("int8",link_name.mystring) If the column link_name.mystring contains the string " ", then the following function returns the value 0. IsValid("int8",link_name.mystring) IsValidDate

9 Returns whether the given value is valid for the type date. Input: testdate (date) Output: result (int8) Examples. If the column link_name.mydate contains the date , then the following function returns the value 1. IsValidDate(link_name.mydate) If the column link_name.mydate contains the string " ", then the following function returns the value 0, because the converted string is not a valid date. IsValidDate(StringTodate (link_name.mydate)) IsValidDecimal Returns whether the given value is valid for the type decimal. If the allzerosflag is set to 0, then an allzeroes representation is not valid. The allzerosflag is set to zero by default. Input: testvalue (decimal) [, allzerosflag (uint8)] Output: result (int8) Examples. If the column link_name.mynum contains the value , then the following function returns the value 1. IsValidDecimal(link_name.mynum) If the column link_name.mynum contains the string "wake robin", then the following function returns the value 0, because the converted string is not a valid decimal. IsValidDecimal(StringToDecimal (link_name.mynum)) IsValidTime Returns whether the given time is valid for the type time. Input: testtime (time) Output: result (int8) Examples. If the column link_name.mytime contains the time 23:09:22, then the following function returns the value 1: IsValidTime(link_name.mytime) If the column link_name.mydate contains the string "IbnKayeed", then the following function returns the value 0, because the converted string is not a valid time. IsValidTime(StringToTime (link_name.mytime)) IsValidTimestamp Returns whether the given timestamp is valid for the type timestamp. Input: testtimestamp (timestamp) Output: result (int8) Examples. If the column link_name.mytimestamp contains the time :09:22,

10 then the following function returns the value 1: IsValidTimestamp(link_name.mytimestamp) If the column link_name.mytimestamp contains the string "one of two", then the following function returns the value 0, because the converted string is not a valid timestamp. IsValidTimestamp(StringToTimestamp (link_name.mytimestamp)) RawNumAt Returns the integer value at the specified index value in the specified raw field. The index starts at 0. Input: rawfield (raw), index (int32) Output: result (int32) Examples. If the column link_name.myraw contains a raw value derived from the string "hello", then the following function returns the integer 0x68 (the ASCII code for the character h): RawNumAt(link_name.myraw, 0) If the column link_name.myraw contains a raw value derived from the string "hello", then the following function returns 0 because the specified index is out of range: RawNumAt(link_name.myraw, 12) RawToString Returns the given raw value as a string representation. You must ensure that the raw input value contains a sequence of bytes that are valid as characters in the target character set in which the output string is used. For example, the raw value { 0xE0 0x41 0x42 } is not a valid sequence of UTF 8 characters, since the lead byte, 0xE0, is supposed to be followed by a byte in the range [0x80..0xBF]. If a raw value { xe0 x41 x42 } is passed to the RawToString function, there could be an error if the output string is then accessed as if it were encoded in UTF 8. Input: rawfield (raw) Output: result (string) Examples. If the column link_name.myraw contains the value { 0x31 0x31 0x30 0x35 0x32 0x32 0x30 0x39 }, then the following function returns the string " ". RawNumAt(link_name.myraw) Seq Generates a numeric code value from an ASCII character. You can optionally specify the allow8bits argument to convert 8 bit ASCII values. Input: Seq (char) Output: result (number) Examples. The following example outputs the character A as the ASCII code 65.

11 Seq("A") SeqAt Returns the numeric code point value of the character at the specified position in the given string. The index starts at 0. If the specified index is out of range, the function returns 0. Input: basestring (string), index (int32) Output: result (int32) Examples. If the column link_name.mystring contains the string "horse", then the following function returns the value 0x6F (that is, the ASCII value of the character o). SeqAt(link_name.mystring, 1) StringToDate Returns a date from the given string in the given format. You do not have to specify a format string if your string contains a date in the default format yyyy mm dd. Input: string (string) [,format (string)] Output: result (date) Examples: If the column link_name.mystring contains the string , then the following function returns the date StringToDate(link_name.mystring) If the column link_name.mystring contains the string 18:08:1958, then the following function returns the date StringToDate(link_name.mystring,"%dd:%mm:%yyyy") StringToDecimal Returns the given string as a decimal representation. The argument rtype optionally specifies a rounding type, and is set to one of the following values: ceil. Round the source field toward positive infinity. For example, 1.4 > 2, 1.6 > 1. floor. Round the source field toward negative infinity. For example, 1.6 > 1, 1.4 > 2. round_inf. Round or truncate the source field toward the nearest representable value, breaking ties by rounding positive values toward positive infinity and negative values toward negative infinity. For example, 1.4 > 1, 1.5 > 2, 1.4 > 1, 1.5 > 2. trunc_zero. Discard any fractional digits to the right of the rightmost fractional digit supported in the destination, regardless of sign. For example, if the destination is an integer, all fractional digits are truncated. If the destination is another decimal with a smaller scale, round or truncate to the scale size of the destination decimal. For example, 1.6 > 1, 1.6 > 1. Input: string (string), [rtype (string)] Output: result (decimal)

12 Examples. If the column link_name.mystring contains the string " ", and the target is defined as having a precision of 7 and a scale of 2, then the following function returns the decimal StringToDecimal(link_name.mystring) If the column link_name.mystring contains the string " ", and the target is defined as having a precision of 7 and a scale of 2, then the following function returns the decimal StringToDecimal(link_name.mystring,"ceil") StringToRaw Returns a string in raw representation. Input: string (string) Output: result (raw) Examples. If the column link_name.mystring contains the string "hello", and the target column is defined as being of type Binary then the following function returns the value { 0x68 0x65 0x6C 0x6C 0x6F }. StringToRaw(link_name.mystring) StringToTime Returns a time representation of the given string. Input: string (string), [format (string)] Output: result (time) Examples: If the column link_name.mystring contains the string "20:06:58", then the function returns a time of 20:06:58. StringToTime(link_name.mystring) If the column link_name.mystring contains the string "20: 6:58", then the function returns a time of 20:06:58. StringToTime(link_name.mystring,"% (h,s):$(n,s):$(s,s)") StringToTimestamp Returns a time representation of the given string. Input: string (string) [format (string)] Output: result (time) Examples: If the column link_name.mystring contains the string " :06:58", then the function returns the timestamp :06:58. StringToTimestamp(link_name.mystring)

13 If the column link_name.mystring contains the string "8/ 8/ : 6:58", then the function returns the timestamp :06:58. StringToTimestamp(link_name.mystring, "%(d,s)/%(m,s)/%yyyy% (h,s):$(n,s):$(s,s)") StringToUstring Returns a ustring from the given string, optionally using the specified map (otherwise uses project default). Input: string (string), [mapname(string)] Output: result (ustring) Examples: If the column link_name.mystring contains the string " ", then the following function returns the ustring " " StringToUstring(link_name.mystring) TimestampToDate Returns a date from the given timestamp. Input: timestamp (timestamp) Output: result (date) Examples: If the column link_name.mytimestamp contains the timestamp :06:58, then the following function returns the date : TimestampToDate(link_name.mytimestamp) TimestampToDecimal Returns the given timestamp as a packed decimal. You can optionally specify a format string that specifies how the timestamp is stored in the decimal number. The default format string is " %yyyy%mm%dd%hh%nn%ss", so, for example, the timestamp :03:22 is stored as the decimal number Format strings can only specify a format that contains numbers. For example, you cannot specify a format string such as "%yyyy/%mm/%dd%hh:%nn:%ss", because the slash character (/) and the colon character (:) cannot be stored in a packed decimal value. The following tokens are valid for conversions to or from decimal values: %yyyy (four digit year) %yy (two digit year) %NNNNyy (two digit year with cutoff) %mm (two digit month) %dd (two digit day of month) %ddd (three digit day of year)

14 %hh (two digit hours using 24 hour clock) %nn (two digit minutes) %ss (two digit seconds) %ss.n (two digit seconds, plus the number of fractional digits allowed. The number of fractional digits is from one to six inclusive). The literal digits 0 to 9 are also valid. If your specified format includes microseconds (for example, %ss.4), then the position of the decimal point is inferred in the decimal value. The position of the decimal point does not have to coincide with the specified scale of the decimal (for example scale = 4). Input: timestamp (timestamp) [, format (string)] Output: result (decimal) Examples: If the column link_name.mytimestamp contains the timestamp :06:58, then the following function returns the decimal value : TimestampToDecimal(link_name.mytimestamp) If the column link_name.mytimestamp contains the timestamp :06:58, then the following function returns the decimal value : TimestampToDecimal(link_name.mytimestamp, "%hh%nn%ss%yy%mm%dd") TimestampToString Returns a string from the given timestamp. Input: timestamp (timestamp) [format (string)] Output: result (string) Examples: If the column link_name.mytimestamp contains the timestamp :06:58, then the function returns the string " :06:58". TimestampToString(link_name.mytimestamp) If the column link_name.mytimestamp contains the timestamp :06:58, then the function returns the string "18/08/ :06:58": TimestampToTime TimestampToString(link_name.mytimestamp, "%dd/%mm/%yyyy %hh:$nn:$ss") Returns the string representation of the given timestamp. Input: timestamp (timestamp) Output: result (time) Examples: If the column link_name.mytimestamp contains the timestamp :06:58, then the function returns the time 20:06:58: TimestampToTime(link_name.mytimestamp)

15 TimeToString Returns a string from the given time. Input: timestamp (timestamp) [format (string)] Output: result (time) Examples: If the column link_name.mytime contains the time 20:06:58, then the following function returns the string "20:06:58": TimeToString(link_name.mytime) If the column link_name.mytime contains the time 20:06:58, then the following function returns the string "58:06:20": TimeToString(link_name.mytime, "%ss:$nn:$hh") TimeToDecimal Returns the given time as a packed decimal. You can optionally specify a format string that specifies how the time is stored in the decimal number. The default format string is " %hh%nn%ss", so, for example, the time 14:03:22 is stored as the decimal number Format strings can only specify a format that contains numbers. For example, you cannot specify a format string such as "%hh:%nn:%ss", because the colon character (:) cannot be stored in a packed decimal value. The following tokens are valid for conversions to or from decimal values: %hh (two digit hours using 24 hour clock) %nn (two digit minutes) %ss (two digit seconds) %ss.n (two digit seconds, plus the number of fractional digits allowed. The number of fractional digits is from one to six inclusive). The literal digits 0 to 9 are also valid. If your specified format includes microseconds (for example, %ss.4), then the position of the decimal point is inferred in the decimal value. The position of the decimal point does not have to coincide with the specified scale of the decimal (for example scale = 4). Input: time (time) [, format (string)] Output: result (decimal) Examples: If the column link_name.mytime contains the time 20:06:58, then the following function returns the decimal value : TimeToDecimal(link_name.mytime) If the column link_name.mytime contains the time 20:06:58, then the following function returns the decimal value : TimeToDecimal(link_name.mytime, "%ss%nn%hh") UstringToString Returns a string from the given ustring, optionally using the specified map (otherwise uses project

16 default). Input: string (ustring) [, mapname(string)] Output: result (string) Examples: If the column link_name.myustring contains the ustring " ", then the following function returns the string " ": UstringToString(link_name.myustring Posted 20th August 2013 by praveen govind Location: Southern Asia 0 Add a comment Enter your comment... Comment as: Google Accoun Publish Preview

COMP2611: Computer Organization. Data Representation

COMP2611: Computer Organization. Data Representation COMP2611: Computer Organization Comp2611 Fall 2015 2 1. Binary numbers and 2 s Complement Numbers 3 Bits: are the basis for binary number representation in digital computers What you will learn here: How

More information

Convert Date to Lilian Format (CEEDAYS) API

Convert Date to Lilian Format (CEEDAYS) API Convert Date to Lilian Format (CEEDAYS) API Required Parameter Group: 1 input_char_date Input VSTRING 2 picture_string Input VSTRING 3 output_lilian_date Output INT4 Omissible Parameter: 4 fc Output FEEDBACK

More information

EnableBasic. The Enable Basic language. Modified by Admin on Sep 13, Parent page: Scripting Languages

EnableBasic. The Enable Basic language. Modified by Admin on Sep 13, Parent page: Scripting Languages EnableBasic Old Content - visit altium.com/documentation Modified by Admin on Sep 13, 2017 Parent page: Scripting Languages This Enable Basic Reference provides an overview of the structure of scripts

More information

These are reserved words of the C language. For example int, float, if, else, for, while etc.

These are reserved words of the C language. For example int, float, if, else, for, while etc. Tokens in C Keywords These are reserved words of the C language. For example int, float, if, else, for, while etc. Identifiers An Identifier is a sequence of letters and digits, but must start with a letter.

More information

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9)

MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 3 Professional Program: Data Administration and Management MANAGING DATA(BASES) USING SQL (NON-PROCEDURAL SQL, X401.9) AGENDA

More information

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur 1 Number Representation 2 1 Topics to be Discussed How are numeric data items actually

More information

Type Conversion. and. Statements

Type Conversion. and. Statements and Statements Type conversion changing a value from one type to another Void Integral Floating Point Derived Boolean Character Integer Real Imaginary Complex no fractional part fractional part 2 tj Suppose

More information

Integer Representation Floating point Representation Other data types

Integer Representation Floating point Representation Other data types Chapter 2 Bits, Data Types & Operations Integer Representation Floating point Representation Other data types Why do Computers use Base 2? Base 10 Number Representation Natural representation for human

More information

CS356: Discussion #3 Floating-Point Operations. Marco Paolieri

CS356: Discussion #3 Floating-Point Operations. Marco Paolieri CS356: Discussion #3 Floating-Point Operations Marco Paolieri (paolieri@usc.edu) Today s Agenda More Integer operations exercise Floating-Point operations exercise for Lab 2 Data Lab 2: What to implement

More information

M1 Computers and Data

M1 Computers and Data M1 Computers and Data Module Outline Architecture vs. Organization. Computer system and its submodules. Concept of frequency. Processor performance equation. Representation of information characters, signed

More information

Computer System and programming in C

Computer System and programming in C 1 Basic Data Types Integral Types Integers are stored in various sizes. They can be signed or unsigned. Example Suppose an integer is represented by a byte (8 bits). Leftmost bit is sign bit. If the sign

More information

Number Representation & Conversion

Number Representation & Conversion Number Representation & Conversion Chapter 4 Under the covers of numbers in Java 1 How (Unsigned) Integers Work Base 10 Decimal (People) Base 2 Binary (Computer) 10 2 10 1 10 0 2 3 4 2 7 2 6 2 5 2 4 2

More information

Universal Format Plug-in User s Guide. Version 10g Release 3 (10.3)

Universal Format Plug-in User s Guide. Version 10g Release 3 (10.3) Universal Format Plug-in User s Guide Version 10g Release 3 (10.3) UNIVERSAL... 3 TERMINOLOGY... 3 CREATING A UNIVERSAL FORMAT... 5 CREATING A UNIVERSAL FORMAT BASED ON AN EXISTING UNIVERSAL FORMAT...

More information

Data Representation in Computer Memory

Data Representation in Computer Memory Data Representation in Computer Memory Data Representation in Computer Memory Digital computer stores the data in the form of binary bit sequences. Binary number system has two symbols: 0 and 1, called

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

The DICOM Package. August 23, Title Import medical imaging data using the DICOM Standard

The DICOM Package. August 23, Title Import medical imaging data using the DICOM Standard The DICOM Package August 23, 2005 Version 0.12 Date 2005-8-23 Title Import medical imaging data using the DICOM Standard Author Brandon Whitcher Maintainer Brandon Whitcher

More information

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3

Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Lecture 3 Floating-Point Data Representation and Manipulation 198:231 Introduction to Computer Organization Instructor: Nicole Hynes nicole.hynes@rutgers.edu 1 Fixed Point Numbers Fixed point number: integer part

More information

CS61B Lecture #14: Integers. Last modified: Wed Sep 27 15:44: CS61B: Lecture #14 1

CS61B Lecture #14: Integers. Last modified: Wed Sep 27 15:44: CS61B: Lecture #14 1 CS61B Lecture #14: Integers Last modified: Wed Sep 27 15:44:05 2017 CS61B: Lecture #14 1 Integer Types and Literals Type Bits Signed? Literals byte 8 Yes Cast from int: (byte) 3 short 16 Yes None. Cast

More information

Strings Investigating Memory Allocation Pointers Fixed-Point Arithmetic. Memory Matters. Embedded Systems Interfacing.

Strings Investigating Memory Allocation Pointers Fixed-Point Arithmetic. Memory Matters. Embedded Systems Interfacing. 22 September 2011 Strings Single character char ch; char ch = a ; char ch = 0x41; Array of characters char str[5]={ H, e, l, l, o }; Null-terminated string char str[ ]= Hello String Runtime Library #include

More information

15213 Recitation 2: Floating Point

15213 Recitation 2: Floating Point 15213 Recitation 2: Floating Point 1 Introduction This handout will introduce and test your knowledge of the floating point representation of real numbers, as defined by the IEEE standard. This information

More information

Floating Point Representation in Computers

Floating Point Representation in Computers Floating Point Representation in Computers Floating Point Numbers - What are they? Floating Point Representation Floating Point Operations Where Things can go wrong What are Floating Point Numbers? Any

More information

Using Custom Number Formats

Using Custom Number Formats APPENDIX B Using Custom Number Formats Although Excel provides a good variety of built-in number formats, you may find that none of these suits your needs. This appendix describes how to create custom

More information

Unit 4. Scalar Functions and Arithmetic

Unit 4. Scalar Functions and Arithmetic Unit 4. Scalar Functions and Arithmetic What This Unit Is About Scalar functions can be used to manipulate column or expression values. This unit will discuss the format and syntax of basic scalar functions.

More information

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers Real Numbers We have been studying integer arithmetic up to this point. We have discovered that a standard computer can represent a finite subset of the infinite set of integers. The range is determined

More information

Computing with Numbers

Computing with Numbers Computing with Numbers Example output: Numeric Data Types Numeric Data Types Whole numbers are represented using the integer data type (int for short).values of type int can be positive or negative whole

More information

Exercises Software Development I. 03 Data Representation. Data types, range of values, internal format, literals. October 22nd, 2014

Exercises Software Development I. 03 Data Representation. Data types, range of values, internal format, literals. October 22nd, 2014 Exercises Software Development I 03 Data Representation Data types, range of values, ernal format, literals October 22nd, 2014 Software Development I Wer term 2013/2014 Priv.-Doz. Dipl.-Ing. Dr. Andreas

More information

Chapter 4: Computer Codes. In this chapter you will learn about:

Chapter 4: Computer Codes. In this chapter you will learn about: Ref. Page Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence Ref. Page

More information

Written Homework 3. Floating-Point Example (1/2)

Written Homework 3. Floating-Point Example (1/2) Written Homework 3 Assigned on Tuesday, Feb 19 Due Time: 11:59pm, Feb 26 on Tuesday Problems: 3.22, 3.23, 3.24, 3.41, 3.43 Note: You have 1 week to work on homework 3. 3 Floating-Point Example (1/2) Q:

More information

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements Review: Exam 1 9/20/06 CS150 Introduction to Computer Science 1 1 Your First C++ Program 1 //*********************************************************** 2 // File name: hello.cpp 3 // Author: Shereen Khoja

More information

JAVA Programming Fundamentals

JAVA Programming Fundamentals Chapter 4 JAVA Programming Fundamentals By: Deepak Bhinde PGT Comp.Sc. JAVA character set Character set is a set of valid characters that a language can recognize. It may be any letter, digit or any symbol

More information

B.V. Patel Institute of BMC & IT, UTU 2014

B.V. Patel Institute of BMC & IT, UTU 2014 BCA 3 rd Semester 030010301 - Java Programming Unit-1(Java Platform and Programming Elements) Q-1 Answer the following question in short. [1 Mark each] 1. Who is known as creator of JAVA? 2. Why do we

More information

1. Introduction to Microsoft Excel

1. Introduction to Microsoft Excel 1. Introduction to Microsoft Excel A spreadsheet is an online version of an accountant's worksheet, which can automatically do most of the calculating for you. You can do budgets, analyze data, or generate

More information

Computer Organization & Systems Exam I Example Questions

Computer Organization & Systems Exam I Example Questions Computer Organization & Systems Exam I Example Questions 1. Pointer Question. Write a function char *circle(char *str) that receives a character pointer (which points to an array that is in standard C

More information

Data File Header Structure for the dbase Version 7 Table File

Data File Header Structure for the dbase Version 7 Table File Page 1 of 5 Data File Header Structure for the dbase Version 7 Table File Note: Unless prefaced by "0x", all s specified in the Description column of the following tables are decimal. 1.1 Table File Header

More information

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved. C How to Program, 6/e 1992-2010 by Pearson Education, Inc. An important part of the solution to any problem is the presentation of the results. In this chapter, we discuss in depth the formatting features

More information

Introduction to Computer Programming in Python Dr. William C. Bulko. Data Types

Introduction to Computer Programming in Python Dr. William C. Bulko. Data Types Introduction to Computer Programming in Python Dr William C Bulko Data Types 2017 What is a data type? A data type is the kind of value represented by a constant or stored by a variable So far, you have

More information

printf( Please enter another number: ); scanf( %d, &num2);

printf( Please enter another number: ); scanf( %d, &num2); CIT 593 Intro to Computer Systems Lecture #13 (11/1/12) Now that we've looked at how an assembly language program runs on a computer, we're ready to move up a level and start working with more powerful

More information

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers Real Numbers We have been studying integer arithmetic up to this point. We have discovered that a standard computer can represent a finite subset of the infinite set of integers. The range is determined

More information

CS107 Handout 13 Spring 2008 April 18, 2008 Computer Architecture: Take II

CS107 Handout 13 Spring 2008 April 18, 2008 Computer Architecture: Take II CS107 Handout 13 Spring 2008 April 18, 2008 Computer Architecture: Take II Example: Simple variables Handout written by Julie Zelenski and Nick Parlante A variable is a location in memory. When a variable

More information

The DDE Server plugin PRINTED MANUAL

The DDE Server plugin PRINTED MANUAL The DDE Server plugin PRINTED MANUAL DDE Server plugin All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic, electronic, or mechanical, including photocopying,

More information

CS61B Lecture #14: Integers

CS61B Lecture #14: Integers Announcement: CS61B Lecture #14: Integers Project #0 due Tuesday night. Programming contest SATURDAY! You can still sign up at https://inst.eecs.berkeley.edu/~ctest/contest/register. Test #1 will be Tuesday,

More information

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example Appendix F Number Systems Binary Numbers Decimal notation represents numbers as powers of 10, for example 1729 1 103 7 102 2 101 9 100 decimal = + + + There is no particular reason for the choice of 10,

More information

NCSS Statistical Software. The Data Window

NCSS Statistical Software. The Data Window Chapter 103 Introduction This chapter discusses the operation of the NCSS Data Window, one of the four main windows of the NCSS statistical analysis system. The other three windows are the Output Window,

More information

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

Programming Date and Time APIs

Programming Date and Time APIs System i Programming Date and Time APIs Version 6 Release 1 System i Programming Date and Time APIs Version 6 Release 1 Note Before using this information and the product it supports, read the information

More information

Language Reference Manual simplicity

Language Reference Manual simplicity Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna

More information

Data Storage and Query Answering. Data Storage and Disk Structure (4)

Data Storage and Query Answering. Data Storage and Disk Structure (4) Data Storage and Query Answering Data Storage and Disk Structure (4) Introduction We have introduced secondary storage devices, in particular disks. Disks use blocks as basic units of transfer and storage.

More information

Java Notes. 10th ICSE. Saravanan Ganesh

Java Notes. 10th ICSE. Saravanan Ganesh Java Notes 10th ICSE Saravanan Ganesh 13 Java Character Set Character set is a set of valid characters that a language can recognise A character represents any letter, digit or any other sign Java uses

More information

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1

COSC344 Database Theory and Applications. Lecture 5 SQL - Data Definition Language. COSC344 Lecture 5 1 COSC344 Database Theory and Applications Lecture 5 SQL - Data Definition Language COSC344 Lecture 5 1 Overview Last Lecture Relational algebra This Lecture Relational algebra (continued) SQL - DDL CREATE

More information

Floating Point Numbers

Floating Point Numbers Floating Point Numbers Computer Systems Organization (Spring 2016) CSCI-UA 201, Section 2 Instructor: Joanna Klukowska Slides adapted from Randal E. Bryant and David R. O Hallaron (CMU) Mohamed Zahran

More information

Floating Point Numbers

Floating Point Numbers Floating Point Numbers Computer Systems Organization (Spring 2016) CSCI-UA 201, Section 2 Fractions in Binary Instructor: Joanna Klukowska Slides adapted from Randal E. Bryant and David R. O Hallaron (CMU)

More information

Floating Point Arithmetic

Floating Point Arithmetic Floating Point Arithmetic Computer Systems, Section 2.4 Abstraction Anything that is not an integer can be thought of as . e.g. 391.1356 Or can be thought of as + /

More information

CSCI 2212: Intermediate Programming / C Chapter 15

CSCI 2212: Intermediate Programming / C Chapter 15 ... /34 CSCI 222: Intermediate Programming / C Chapter 5 Alice E. Fischer October 9 and 2, 25 ... 2/34 Outline Integer Representations Binary Integers Integer Types Bit Operations Applying Bit Operations

More information

ECO History: Date Revision ECO# Description of Change

ECO History: Date Revision ECO# Description of Change Serial Commands Model 3007 9030034 Rev - Cognizant Individuals: Prepared by: Arndt Poecher Date: 3-27-2001 Approved by: Date: 3-27-2001 ECO History: Date Revision ECO# Description of Change Purpose and

More information

ARG! Language Reference Manual

ARG! Language Reference Manual ARG! Language Reference Manual Ryan Eagan, Mike Goldin, River Keefer, Shivangi Saxena 1. Introduction ARG is a language to be used to make programming a less frustrating experience. It is similar to C

More information

Computer Programming, I. Laboratory Manual. Experiment #3. Selections

Computer Programming, I. Laboratory Manual. Experiment #3. Selections Think Twice Code Once The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2005 Khaleel I. Shaheen Computer Programming, I Laboratory Manual Experiment #3

More information

Supplement 2. ANS For Floating Point. Triangle Digital Support Ltd. Triangle Digital Support 1

Supplement 2. ANS For Floating Point. Triangle Digital Support Ltd. Triangle Digital Support 1 For orth Floating Point Triangle Digital Support Ltd Triangle Digital Support 1 TDS2020F FORTH FLOATING POINT DESCRIPTION TDS-FLOAT- is a fully featured floating point handling package for the TDS2020F

More information

Data Types What is a Data type? A Data type defines how a pattern of bits will be interpreted. What are Intrinsic Data types? Intrinsic data types are the data types that are defined within a particular

More information

Flexible Rate Card Importer

Flexible Rate Card Importer Edition: 1.0 Release date: August 23, 2016 Smile version: 6.0 Published by Inomial Pty Ltd Suite 801, 620 Bourke St, Melbourne, Vic 3000, Australia www.inomial.com +61 3 9663 3554 sales@inomial.com support@inomial.com

More information

Java Programming Fundamentals. Visit for more.

Java Programming Fundamentals. Visit  for more. Chapter 4: Java Programming Fundamentals Informatics Practices Class XI (CBSE Board) Revised as per CBSE Curriculum 2015 Visit www.ip4you.blogspot.com for more. Authored By:- Rajesh Kumar Mishra, PGT (Comp.Sc.)

More information

Week 3 Lecture 2. Types Constants and Variables

Week 3 Lecture 2. Types Constants and Variables Lecture 2 Types Constants and Variables Types Computers store bits: strings of 0s and 1s Types define how bits are interpreted They can be integers (whole numbers): 1, 2, 3 They can be characters 'a',

More information

Chapter 2 Data Representations

Chapter 2 Data Representations Computer Engineering Chapter 2 Data Representations Hiroaki Kobayashi 4/21/2008 4/21/2008 1 Agenda in Chapter 2 Translation between binary numbers and decimal numbers Data Representations for Integers

More information

Building a Test Suite

Building a Test Suite Program #3 Is on the web Exam #1 Announcements Today, 6:00 7:30 in Armory 0126 Makeup Exam Friday March 9, 2:00 PM room TBA Reading Notes (Today) Chapter 16 (Tuesday) 1 API: Building a Test Suite Int createemployee(char

More information

COMP-202: Foundations of Programming

COMP-202: Foundations of Programming COMP-202: Foundations of Programming Lecture 3: Basic data types Jackie Cheung, Winter 2016 Review: Hello World public class HelloWorld { } public static void main(string[] args) { } System.out.println("Hello,

More information

CS 115 Data Types and Arithmetic; Testing. Taken from notes by Dr. Neil Moore

CS 115 Data Types and Arithmetic; Testing. Taken from notes by Dr. Neil Moore CS 115 Data Types and Arithmetic; Testing Taken from notes by Dr. Neil Moore Statements A statement is the smallest unit of code that can be executed on its own. So far we ve seen simple statements: Assignment:

More information

Integer Data Types. Data Type. Data Types. int, short int, long int

Integer Data Types. Data Type. Data Types. int, short int, long int Data Types Variables are classified according to their data type. The data type determines the kind of information that may be stored in the variable. A data type is a set of values. Generally two main

More information

Binary Encodings for JavaScript Object Notation: JSON-B, JSON-C, JSON-D

Binary Encodings for JavaScript Object Notation: JSON-B, JSON-C, JSON-D Internet Engineering Task Force P. Hallam-Baker Internet-Draft Comodo Group Inc. Intended status: Standards Track June 11, 2013 Expires: December 13, 2013 Binary Encodings for JavaScript Object Notation:

More information

Senturus Analytics Connector. User Guide Cognos to Power BI Senturus, Inc. Page 1

Senturus Analytics Connector. User Guide Cognos to Power BI Senturus, Inc. Page 1 Senturus Analytics Connector User Guide Cognos to Power BI 2019-2019 Senturus, Inc. Page 1 Overview This guide describes how the Senturus Analytics Connector is used from Power BI after it has been configured.

More information

Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang

Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang Topics History of Programming Languages Compilation Process Anatomy of C CMSC 104 Coding Standards Machine Code In the beginning,

More information

1.2 Round-off Errors and Computer Arithmetic

1.2 Round-off Errors and Computer Arithmetic 1.2 Round-off Errors and Computer Arithmetic 1 In a computer model, a memory storage unit word is used to store a number. A word has only a finite number of bits. These facts imply: 1. Only a small set

More information

Reading Sample. ABAP Programming Concepts Object-Oriented ABAP. Contents. Index. The Author. First-hand knowledge.

Reading Sample. ABAP Programming Concepts Object-Oriented ABAP. Contents. Index. The Author.   First-hand knowledge. First-hand knowledge. Reading Sample In this reading sample, we provide two sample chapters. The first sample chapter introduces basic ABAP programming language concepts, which lay the foundation to writing

More information

Adobe EchoSign Calculated Fields Guide

Adobe EchoSign Calculated Fields Guide Adobe EchoSign Calculated Fields Guide Version 1.0 Last Updated: May, 2013 Table of Contents Table of Contents... 2 Overview... 3 Calculated Fields Use-Cases... 3 Calculated Fields Basics... 3 Calculated

More information

The Math Class. Using various math class methods. Formatting the values.

The Math Class. Using various math class methods. Formatting the values. The Math Class Using various math class methods. Formatting the values. The Math class is used for mathematical operations; in our case some of its functions will be used. In order to use the Math class,

More information

Binary representation of integer numbers Operations on bits

Binary representation of integer numbers Operations on bits Outline Binary representation of integer numbers Operations on bits The Bitwise AND Operator The Bitwise Inclusive-OR Operator The Bitwise Exclusive-OR Operator The Ones Complement Operator The Left Shift

More information

UNIT 7A Data Representation: Numbers and Text. Digital Data

UNIT 7A Data Representation: Numbers and Text. Digital Data UNIT 7A Data Representation: Numbers and Text 1 Digital Data 10010101011110101010110101001110 What does this binary sequence represent? It could be: an integer a floating point number text encoded with

More information

Chapter 2 Float Point Arithmetic. Real Numbers in Decimal Notation. Real Numbers in Decimal Notation

Chapter 2 Float Point Arithmetic. Real Numbers in Decimal Notation. Real Numbers in Decimal Notation Chapter 2 Float Point Arithmetic Topics IEEE Floating Point Standard Fractional Binary Numbers Rounding Floating Point Operations Mathematical properties Real Numbers in Decimal Notation Representation

More information

Module 2: Computer Arithmetic

Module 2: Computer Arithmetic Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N

More information

Data Representations & Arithmetic Operations

Data Representations & Arithmetic Operations Data Representations & Arithmetic Operations Hiroaki Kobayashi 7/13/2011 7/13/2011 Computer Science 1 Agenda Translation between binary numbers and decimal numbers Data Representations for Integers Negative

More information

Programming in Python 3

Programming in Python 3 Programming in Python 3 Programming transforms your computer from a home appliance to a power tool Al Sweigart, The invent with Python Blog Programming Introduction Write programs that solve a problem

More information

WLAN CDR Field Descriptions

WLAN CDR Field Descriptions This chapter describes the WLAN-CDR fields supported by PDG/TTG. The following information is provided for each field: Description: The field's description. : The field's data format. : The field's size,

More information

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers 198:211 Computer Architecture Topics: Lecture 8 (W5) Fall 2012 Data representation 2.1 and 2.2 of the book Floating point 2.4 of the book Computer Architecture What do computers do? Manipulate stored information

More information

Exercise: Using Numbers

Exercise: Using Numbers Exercise: Using Numbers Problem: You are a spy going into an evil party to find the super-secret code phrase (made up of letters and spaces), which you will immediately send via text message to your team

More information

Objects and Types. COMS W1007 Introduction to Computer Science. Christopher Conway 29 May 2003

Objects and Types. COMS W1007 Introduction to Computer Science. Christopher Conway 29 May 2003 Objects and Types COMS W1007 Introduction to Computer Science Christopher Conway 29 May 2003 Java Programs A Java program contains at least one class definition. public class Hello { public static void

More information

A Java program contains at least one class definition.

A Java program contains at least one class definition. Java Programs Identifiers Objects and Types COMS W1007 Introduction to Computer Science Christopher Conway 29 May 2003 A Java program contains at least one class definition. public class Hello { public

More information

Zheng-Liang Lu Java Programming 45 / 79

Zheng-Liang Lu Java Programming 45 / 79 1 class Lecture2 { 2 3 "Elementray Programming" 4 5 } 6 7 / References 8 [1] Ch. 2 in YDL 9 [2] Ch. 2 and 3 in Sharan 10 [3] Ch. 2 in HS 11 / Zheng-Liang Lu Java Programming 45 / 79 Example Given a radius

More information

CS107, Lecture 3 Bits and Bytes; Bitwise Operators

CS107, Lecture 3 Bits and Bytes; Bitwise Operators CS107, Lecture 3 Bits and Bytes; Bitwise Operators reading: Bryant & O Hallaron, Ch. 2.1 This document is copyright (C) Stanford Computer Science and Nick Troccoli, licensed under Creative Commons Attribution

More information

±M R ±E, S M CHARACTERISTIC MANTISSA 1 k j

±M R ±E, S M CHARACTERISTIC MANTISSA 1 k j ENEE 350 c C. B. Silio, Jan., 2010 FLOATING POINT REPRESENTATIONS It is assumed that the student is familiar with the discussion in Appendix B of the text by A. Tanenbaum, Structured Computer Organization,

More information

Syntax and Variables

Syntax and Variables Syntax and Variables What the Compiler needs to understand your program, and managing data 1 Pre-Processing Any line that starts with # is a pre-processor directive Pre-processor consumes that entire line

More information

Standard 11. Lesson 9. Introduction to C++( Up to Operators) 2. List any two benefits of learning C++?(Any two points)

Standard 11. Lesson 9. Introduction to C++( Up to Operators) 2. List any two benefits of learning C++?(Any two points) Standard 11 Lesson 9 Introduction to C++( Up to Operators) 2MARKS 1. Why C++ is called hybrid language? C++ supports both procedural and Object Oriented Programming paradigms. Thus, C++ is called as a

More information

Time: 8:30-10:00 pm (Arrive at 8:15 pm) Location What to bring:

Time: 8:30-10:00 pm (Arrive at 8:15 pm) Location What to bring: ECE 120 Midterm 1 HKN Review Session Time: 8:30-10:00 pm (Arrive at 8:15 pm) Location: Your Room on Compass What to bring: icard, pens/pencils, Cheat sheet (Handwritten) Overview of Review Binary IEEE

More information

Introduction to Computers and Programming. Numeric Values

Introduction to Computers and Programming. Numeric Values Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 5 Reading: B pp. 47-71 Sept 1 003 Numeric Values Storing the value of 5 10 using ASCII: 00110010 00110101 Binary notation: 00000000

More information

Outline. Data and Operations. Data Types. Integral Types

Outline. Data and Operations. Data Types. Integral Types Outline Data and Operations Data Types Arithmetic Operations Strings Variables Declaration Statements Named Constant Assignment Statements Intrinsic (Built-in) Functions Data and Operations Data and Operations

More information

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754

Floating Point Puzzles. Lecture 3B Floating Point. IEEE Floating Point. Fractional Binary Numbers. Topics. IEEE Standard 754 Floating Point Puzzles Topics Lecture 3B Floating Point IEEE Floating Point Standard Rounding Floating Point Operations Mathematical properties For each of the following C expressions, either: Argue that

More information

DESIGN OF A COMPOSITE ARITHMETIC UNIT FOR RATIONAL NUMBERS

DESIGN OF A COMPOSITE ARITHMETIC UNIT FOR RATIONAL NUMBERS DESIGN OF A COMPOSITE ARITHMETIC UNIT FOR RATIONAL NUMBERS Tomasz Pinkiewicz, Neville Holmes, and Tariq Jamil School of Computing University of Tasmania Launceston, Tasmania 7250 AUSTRALIA Abstract: As

More information

SIGNED AND UNSIGNED SYSTEMS

SIGNED AND UNSIGNED SYSTEMS EE 357 Unit 1 Fixed Point Systems and Arithmetic Learning Objectives Understand the size and systems used by the underlying HW when a variable is declared in a SW program Understand and be able to find

More information

Electricity Information Exchange Protocols (EIEP)

Electricity Information Exchange Protocols (EIEP) The Authority is currently updating the numbering and formatting in this document and an updated document will be released soon. Electricity Information Exchange Protocols (EIEP) Functional Specification

More information

Engineering Computing I

Engineering Computing I Engineering Computing I Types, Operators, and Expressions Types Operators Expressions 2 1 2.1 Variable Names Names are made up of letters and digits The first character must be a letter The underscore

More information

Data types String data types Numeric data types Date, time, and timestamp data types XML data type Large object data types ROWID data type

Data types String data types Numeric data types Date, time, and timestamp data types XML data type Large object data types ROWID data type Data types Every column in every DB2 table has a data type. The data type influences the range of values that the column can have and the set of operators and functions that apply to it. You specify the

More information

CS429: Computer Organization and Architecture

CS429: Computer Organization and Architecture CS429: Computer Organization and Architecture Dr. Bill Young Department of Computer Sciences University of Texas at Austin Last updated: September 18, 2017 at 12:48 CS429 Slideset 4: 1 Topics of this Slideset

More information

CSCI 402: Computer Architectures. Arithmetic for Computers (4) Fengguang Song Department of Computer & Information Science IUPUI.

CSCI 402: Computer Architectures. Arithmetic for Computers (4) Fengguang Song Department of Computer & Information Science IUPUI. CSCI 402: Computer Architectures Arithmetic for Computers (4) Fengguang Song Department of Computer & Information Science IUPUI Homework 4 Assigned on Feb 22, Thursday Due Time: 11:59pm, March 5 on Monday

More information