[Year 12 SofDev] Data Type Sizes

Kevork Krozian kevork at edulists.com.au
Fri May 31 22:48:56 EST 2013


Hi Folks,

 

Interesting discussion Damien and Robert.

I think the answers have to do with the width of the address bus of the
architecture of the machine, see http://en.wikipedia.org/wiki/Address_bus .

The width of the address bus ( number of wires/bits ) determines the size of
the addressable unit of memory, retrieved or stored, known as the word size,
see http://en.wikipedia.org/wiki/Word_(data_type) . So an 8 bit address bus
uses a word size of 8 bits, 16 uses a 16 bit word etc. 

Therefore, while it may be possible to represent a character with 8 bits
depending on the encoding used ( ASCII, EBCDIC) , the overriding factor is
the CPU architecture that determines the addressable memory size, hence 8,
16, 32 and 64 bit word sizes would use different storage sizes for the same
amount of data as either a single word size or multiples of the basic word
size.

As the references quoted here indicate, while there are exceptions ( why
keep things simple ??? ) , the general outline is the underlying principle
of units of memory used for storage of data and different data types.  

 

As for the Study Design purpose I don't think the physical size of memory in
the implementation is what is described, rather the number of characters
used for each data item. Eg. postcode is 4 characters,  name is 15
characters, state is 3 characters , age is an integer etc.  

 

Happy to hear any other views.

 

Kevork Krozian

Edulists Creator Administrator

www.edulists.com.au

tel: 0419 356 034

 

From: sofdev-bounces at edulists.com.au [mailto:sofdev-bounces at edulists.com.au]
On Behalf Of Robert Timmer-Arends
Sent: Friday, 31 May 2013 8:06 PM
To: Year 12 Software Development Teachers' Mailing List
Subject: Re: [Year 12 SofDev] Data Type Sizes

 

Hello Damien

 

First, I'm not sure that how the various data types are physically stored is
part of the study design - at least, I can't see it anywhere.

 

Second, one reason for the different storage sizes is probably historical as
much as anything. For example, C was developed on PDP-11 which was a 16-bit
minicomputer, so 2 bytes as basic int storage makes sense. C++, coming along
later as it did, was probably first developed on a 32-bit machine. I
wouldn't be surprised if VB.NETs owes its 2-byte integers to its ancestor
quickBASIC, originally written for 8088/86 machines.The other number types
would have a similar heritage.

 

As for char, 1 byte accomodates ASCII, while 2 bytes accomodates Unicode. I
don't know why, but MS was one of the early adopters of Unicode, possibly
because of its flagship product MS Word, so building chars on 2 bytes would
have been a logical step for them.

 

The boolean data type is the interesting one. In principle it only needs one
bit, but fetching a single bit from memory can be very inefficient,
depending on how the memory system is designed. That leads to 1 byte storage
on older machines since it's more efficient to store a byte than a bit (0000
0000 or 1111 1111), although I'm not sure how that translates to 32-bit
machines!

 

Regards

Robert T-A

 

----- Original Message ----- 

From: ATKINSON-BUCK, Damien <mailto:Damien.ATKINSON-BUCK at ivanhoe.com.au>  

To: Year 12 Software Development Teachers' Mailing
List(sofdev at edulists.com.au) <mailto:sofdev at edulists.com.au)>  

Sent: Friday, May 31, 2013 3:42 PM

Subject: [Year 12 SofDev] Data Type Sizes

 

Hi folks, 

            I've been working through various data dictionaries with my
students and the issue of data type sizes, somebody pointed out a difference
between the text and what VB.NET state, so I decided to do a bit of research
into various languages and see what they store data as. Attached are the
results. It's OK for SACs as we can base that on the language we're using,
but just wondering what the official VCAA size might be - and if anyone can
explain the reasons for the difference (I assume it's due to various
compilation methods, but the brain is too fried to go into too much). Also,
anyone out there using the languages that I have blank fields on that could
fill them in?

Cheers

Damien

 


Damien Atkinson-Buck
Head of Learning Area: Technology/Arts 


p: +61 3 9490 3848

e: damien.atkinson-buck at ivanhoe.com.au


f: +61 3 9490 3490

w:  <http://www.ivanhoe.com.au> www.ivanhoe.com.au


Please consider the environment before printing this e-mail.





Privacy, Virus and Copyright Warning

The information contained in this electronic message (e-mail), and any files
transmitted with it:

* is intended for the named recipients only. If you have received this in
error, please advise the sender and delete it and any copies immediately;
* Any personal information in this email must be used in accordance with the
Privacy Act 1988 and this always applies even if it has been sent to you in
error.
* represents the views of the sender and does not necessarily represent the
views or formal advice of Ivanhoe Grammar School;
* may be subject to Copyright, so no further use should be made of it
without the author's permission.

The School does not represent or warrant that the email or any files
attached do not contain errors or are free from computer viruses or other
defects nor does it accept responsibility for any loss or damage resulting
directly or indirectly from the use of the email or any attached files. 


  _____  


_______________________________________________
http://www.edulists.com.au - FAQ, Subscribe, Unsubscribe
IT Software Development Mailing List kindly supported by
http://www.vcaa.vic.edu.au - Victorian Curriculum and Assessment Authority
and
http://www.vcaa.vic.edu.au/vce/studies/infotech/softwaredevel3-4.html 
http://www.vitta.org.au  - VITTA Victorian Information Technology Teachers
Association Inc
http://www.swinburne.edu.au/ict/schools - Swinburne University

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.edulists.com.au/pipermail/sofdev/attachments/20130531/396340e5/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 51301 bytes
Desc: not available
Url : http://www.edulists.com.au/pipermail/sofdev/attachments/20130531/396340e5/attachment-0001.obj 


More information about the sofdev mailing list