Introduction to Data type and Codes

Data type specifies the type of data that is to be used in a program. A data structure is an organized group of data items which is treated as a unit. Array Structure Array is a collection of sequences, of storage of same type of data such as integer, real or character. Structure is a collection of heterogeneous data (different types of data) under a same name. Array are one dimensional, two dimensional or three dimensional. Structure is only of one dimension. In array, we can store any number of data such as Integer, Real or Character.

Summary

Data type specifies the type of data that is to be used in a program. A data structure is an organized group of data items which is treated as a unit. Array Structure Array is a collection of sequences, of storage of same type of data such as integer, real or character. Structure is a collection of heterogeneous data (different types of data) under a same name. Array are one dimensional, two dimensional or three dimensional. Structure is only of one dimension. In array, we can store any number of data such as Integer, Real or Character.

Things to Remember

Introduction to data types:

  • Simple data types; Integer, Real. Character and Boolean.
  • Data structure; Array, Link list, tree and String.

Differences between Array and Structure.

Introduction to Codes:

  • Absolute Binary.
  • BCD
  • ASCII
  • EBCDIC
  • Unicode

MCQs

No MCQs found.

Subjective Questions

Q1:

Explain the ways of caring preterm infant ?


Type: Long Difficulty: Easy

Show/Hide Answer
Answer: <p>Care of preterm infant</p>
<ul>
<li>Maintain warmth</li>
<li>Cover with warmth cloth, keeps baby&rsquo;s head covered, delay bathing.</li>
<li>Place infant in incubator radiant warmer. Maintain a temperature of an incubator.</li>
<li>Kangoo mother care.</li>
<li>Monitor auxiliary temperature.</li>
<li>Maintain environment warm.</li>
<li>Minimize exposure of child as much as possible.</li>
<li>Ensure adequate breastfeeding or expressed breast milk feeding.</li>
<li>Maintain room temperature.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Maintain effective breathing and adequate oxygenation</li>
<li>Sniffing position.</li>
<li>Observe for respiratory rate, cyanosis, nasal flaring, oxygen saturation etc.</li>
<li>Administer oxygen.</li>
<li>Do suctioning as needed.</li>
<li>Use semi-prone or side lying position after feeding.</li>
<li>Maintain respiratory support apparatus such as a ventilator.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Provide nutritional need</li>
<li>Initial breastfeeding soon after birth.</li>
<li>Exclusive breastfeeding.</li>
<li>Maintain parental/enteral fluid nutrition if oral feeding not possible.</li>
<li>Feed expressed breast milk through NG tube.</li>
<li>Assess readiness for nipple suck.</li>
<li>Encourage mother for breastfeeding if possible.</li>
<li>Assess for tolerance of feeding.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Protect from infection</li>
<li>Ensure handwashing before caring newborn.</li>
<li>Ensure all equipment used are clean.</li>
<li>Isolate the infant who has an infection.</li>
<li>Administer antibiotics as prescribed.</li>
<li>Maintain strict asepsis.</li>
<li>Don't keep infected babies in the same room.</li>
<li>Prompt detection and treatment of infection.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Skincare to maintain skin integrity</li>
<li>Position change.</li>
<li>Back care and sponging with warm water.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Maintain adequate hydration</li>
<li>Monitor fluid and electrolytes.</li>
<li>Ensure adequate oral/parental fluid.</li>
<li>Monitor urinary output.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>To attain normal growth and development</li>
<li>Provide optimum nutrition.</li>
<li>Provide adequate rest and sleep.</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Promote family processes and infant-parent attachment</li>
<li>Provide adequate information about child&rsquo;s condition and progress.</li>
<li>Encourage family members to visit a child.</li>
<li>Involve mother in the care of a baby if possible.</li>
<li>Answer questions of family members.</li>
</ul>

Q2:

List the problems face by preterm infants .


Type: Short Difficulty: Easy

Show/Hide Answer
Answer: <p>Problems faced by preterm newborn are ;</p>
<ul>
<li>Feeding difficulties.</li>
<li>Hypoglycemia</li>
<li>Hypothermia</li>
<li>Severe infection and poor prognosis</li>
<li>Respiratory problems due to lung immaturity</li>
<li>Jaundice due to immature liver</li>
<li>Brain injury</li>
<li>Retinopathy of prematurity</li>
<li>Anemia of prematurity</li>
</ul>

Q3:

What do you mean by the preterm infant ?


Type: Very_short Difficulty: Easy

Show/Hide Answer
Answer: <p>Preterm birth, also known as premature birth, is the birth of a baby at less than 37 weeks gestational age.These babies are known as preemies or premises.Symptoms of preterm labor include uterine contractions which occur more often than every ten minutes or the leaking of fluid from the vagina. Premature infants are at greater risk for cerebral palsy,delays in development ,hearing problems and problems seeing.</p>

Videos

Physical Exam- 31 weeks gestation preterm infant
Neonatal Intensive Care for Premature Baby
Introduction to Data type and Codes

Introduction to Data type and Codes

INTRODUCTION TO DATA TYPE

Data type is defined as a set of values that a variable can store along with a set of operations that can be performed on that variable. Data type specifies the type of data that is to be used in a program.

j

Fig. Data Type

Source:www.subjectcoach.com

There are 2 types of data. They are:

Primitive/ Simple data type

Simple data type is classified into 4 data type:

j

Fig: Types of Data Type

Source: www.daydreameducation.co.uk

  1. Integer: Integer is the basic data type which contains discrete numbers (both +ve and –ve) like 2,-5, etc. The range of value for integer differs from one programming language to another. An integer data type cannot have fraction or an exponent.

  2. Real: The data type which contains any numeric representation is called real data type. The value may be signed or unsigned, fractions or exponential as well. Example: 0, 0.5, 4.7234, 3.0e-4, etc are real numbers.

  3. Characters: The data type which contains any printable alpha-numeric character plus another special character like #, @, %, etc are called Character data type.
    Example: Alphabets: a to z/ A to Z
    Numbers: 0 to 9

  4. Boolean (logical): The data type which only takes one of two possible values at any one time is called Boolean data type. The two values are true and false. It is useful for checking the condition inside a program. Example: AND, OR and NOT.


Data Structure:

A data structure is an organized group of data items which is treated as a unit. It may be regarded as the computer data type. The main data structures are listed below:

Types of Data Structures
Fig: Types of Data Structures

Source :www.slideshare.net

  1. Array: Array is a collection of sequences from the storage of the same type of data such as Integer, Real or Character. It is of 1 to 3 dimensions.

  2. String: String is an array of characters. They are used in programming for storing and manipulating texts such as words, names and sentences. The combination of more than one character inside double quotation mark like “welcome”, “056-2345”, etc. is called string data type. In programming, there can be various string processing operations such as string comparison, string sorting, etc.

  3. Tree: It is a hierarchical complex data structure where each element known as node, contains data part and a pointer (address) to another node.The top most nodes (which are not pointed by any other node) are called Root nodes. The node which doesn’t point to any other node is known as Leaf node. If a node can point two nodes at the maximum, then such tree is known as Binary tree.

  4. Link list: Link List is a data structure composed of elements, containing data and pointers to the next element of the same type. In other words, link list is a chain of elements where one element points to another.
    The first node does not contain information. It only contains the address of another node. The last node points to NULL but stores information. But, if the last pointer points to the first element of the list, then the list becomes circular link list. The info field contains actual elements on the list. The next address field contains the address of the next node in the list.


Differences between Array and Structure:

Array

Structure

Array is a collection of sequences, of storage of the same type of data such as integer, real or character.

Structure is a collection of heterogeneous data (different types of data) under the same name.

Array are one dimensional, two dimensional or three dimensional.

Structure is only of one dimension.

In the array, we can store any number of data type using only one variable.

In structure, we have to use different variables to store different data types.

Array cannot store varying data types.

Structure stores varying data types.

Example: If we construct an array A of integer there we can only store integer data type. We cannot put integer and character data in a single array

Example: In structure, we can put different data type under the same name.

In the array, a structure is not included.

In structure, we can easily include array.


INTRODUCTIONTO CODES

A computer can only understand binary numbers which are in the form of two electronic states i.e. high voltage and low voltage. Such notations are further derived into standard codes and such codes can represent the data for users' convenience. Some of the popular codes are:

  1. Absolute Binary (pure binary): In an absolute binary method, 0 is placed before the binary number to represent positive number and 1 is placed before the binary number to represent a negative number. The most significant bit in binary number denotes the sign bit and the rest bits represent the actual number. The binary number is expressed in 8,16,32,64, etc. bit format.


    k
    Fig: pure binary clock with Arduino
    Source:www.instructables.com


  2. BCD (Binary Coded Decimal): It is a simple system for converting decimal numbers into a binary form where each decimal number is converted separately into binary and placed spaces in between numbers. In BCD, each decimal digit occupies 4 bit. For example, the decimal number 24 can be represented in BCD as (0010 0100)2.


    s
    Fig: Binary Coded Decimal
    Source:www.tutorialspoint.com

  3. ASCII (American Standard Code for Information Interchange): ASCII is a standard coding system that assigns numeric values to the letter, numbers, punctuation marks and control characters to achieve compatibility with different hardware and peripherals. ASCII was developed in 1968 and was divided into 2 sets: Standard ASCII (7 bits code, 128 characters) and Extended ASCII (8 bits code, 256 characters). Most systems use 8 bit extended ASCII to represent foreign language characters and other graphical symbols.

    v
    Fig: ANSI Extended ASCII
    Source:www.cplusplus.com

    In ASCII, each character is represented by a unique integer value from 0 to 255. The value 0 to 31 is used for non-printing control characters and the range from 32 to 127 is used to represent the letters of the alphabet and common punctuation symbols. For example: ASCII code for capital letter A is 65, for * is 42, etc. Since, ASCII code uses 8 bits, each character represented in ASCII code occupies 1-byte storage space in a computer.


  4. EBCDIC (Extended Binary Coded Decimal Interchange Code): It is an 8-bit code system which is commonly used on large IBM mainframe computers, most IBM minicomputers and computers from many other manufacturers. It allows 256 characters to be represented in computers.
    In this code, placement of the letters of the alphabet is discontinuous and there is no direct character to character match when converting from EBCDIC to ASCII and vice versa.


    v
    Fig: EBCDIC Format
    Source:shieldsdesignllc.com

  5. Unicode: It is a 16-bit character code defined by the Unicode Consortium and International Standard Organization (ISO) that supports up to 65,536 characters. It allows all the characters and symbols in any language in the world to be represented by a single code. For example, the Chinese language has almost 10,000 characters which can be represented by Unicode only. If Unicode is universally adopted, then it will make multilingual software much easier to write and maintain.

    k
    Fig:Unicode in Python
    Source: ian-albert.com
    Since, Unicode uses 16 bits, each character represented in Unicode occupies 2 bytes storage space in the computer. This coding system has been developed to overcome the drawback of ASCII code that supports only 256 different characters, which is sufficient only for English language but not for all the languages like Chinese, Japanese, etc. which has more than 256 characters. The Unicode Worldwide Character Standard provides up to 4 bytes (32 bits) now.

    (Shrestha & Karn, 2015)

Bibliography

Shrestha, R. K., & Karn, M. K. (2015). Computer Science I. Anamnagar, Kathmandu: Buddha Publication.

Adhikari, Deepak et.al., Computer Science-XI, Asia Publication Pvt. Ltd,ktm





Lesson

Programming Concepts &amp; Logics

Subject

Computer Science

Grade

Grade 11

Recent Notes

No recent notes.

Related Notes

No related notes.