What Exactly Is Data and How Does It Work?

  • Thread starter Thread starter hkhil
  • Start date Start date
  • Tags Tags
    Data Earth
Click For Summary
SUMMARY

The forum discussion centers on the nature of data, specifically how it is stored and represented in computing. Data is fundamentally composed of bits, which are binary digits (1s and 0s) that can be stored in various physical mediums, such as hard drives and DVDs. The discussion highlights that data can represent various forms, including text, images, and sound, and emphasizes the role of the CPU in processing this data through machine code. Key insights include the distinction between physical representations of data, such as magnetic fields on floppy disks and pits on DVDs, and the abstraction of data itself.

PREREQUISITES
  • Understanding of binary numeral system and bits
  • Familiarity with ASCII encoding and character representation
  • Knowledge of data storage mediums (e.g., hard drives, DVDs, floppy disks)
  • Basic concepts of computer architecture, including CPU and machine code
NEXT STEPS
  • Explore data encoding techniques, focusing on ASCII and Unicode
  • Learn about different data storage technologies, including SSDs and HDDs
  • Research how data compression algorithms work to optimize storage
  • Study the principles of digital signal processing for audio and video data
USEFUL FOR

This discussion is beneficial for computer science students, software developers, data engineers, and anyone interested in understanding the foundational concepts of data storage and representation in computing.

  • #31
Yeah sorry eNathan, bytes are simply a common currency in common use, but by no means the only practically used unit.
 
Computer science news on Phys.org
  • #32
-Job- said:
Booleans take up 1 bit. I can store up to two 16 booleans in two bytes. (16 booleans / 16 bits= 1 bit) If i only want to store a single bit then i might not have the choice because data storage is not partitioned by individual bits. But that's a formality. Many times it's the bits, and not the bytes, that will affect the program flow.

eNathan's point is that most programming languages (C included) actually use an entire byte for each variable of type bool. The reason, of course, is that the processor is generally design to operate on bytes. Programs which use individual bits must include code to pack and unpack those bits, which slows the program down.

Note that some processors, notably microcontrollers, do provide instructions to operate on individual bits, but these are rarely available in microprocessors.

The following piece of C code demonstrates that my compiler (gcc 3.4.4) uses an entire byte to store a bool:

Code:
#include "stdio.h"

int main()
{
        printf("sizeof(bool) = %d", sizeof(bool));
}

Several people, eNathan included, are making rather semantic arguments in this thread. A boolean value certainly contains no more than a single bit of actual information; on the other hand, a boolean value may occupy an entire byte (or more) of memory, simply because the resulting program runs faster.

- Warren
 
  • #33
booleans aside, bit arrays are stored as individual bits. The entries have to be extracted from the byte using logical masks.
 
  • #34
eNathan's point is that most programming languages (C included) actually use an entire byte for each variable of type bool. The reason, of course, is that the processor is generally design to operate on bytes. Programs which use individual bits must include code to pack and unpack those bits, which slows the program down.
That may be true, but his statement is still not correct. The word bit is used many times when referring to data, especially in other area's of Information Technology out-with Programming. Anyway yes this thread is a bit semantical :biggrin:
 
  • #35
I think data is an abstraction. It is meaningless, by itself, but definable within a system. data in a computer, is whatever we define it to be.
 
  • #36
theName() said:
I think data is an abstraction. It is meaningless, by itself, but definable within a system. data in a computer, is whatever we define it to be.
This is quite true.

Sometimes someone will ask me what particular file is that they don't recognize and can't open with any known program. I suggest they open it in Notepad to see what's in it.

They look surprised "You can do that?"

"Of course (though it might appear to be gobbledegook). All bytes are merely 0-255; it is merely a matter of how they are interpreted. Notepad happens to assign them ASCII letters. Another program might assign them colours. Regardless, they're still just 0-255. The file is interpretation-agnostic. It doesn't know how its data will be interpreted by any given program (although the file can make suggestions, such as "my data is only meaningful as ASCII")

Information = data with meaning.
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
1
Views
2K
Replies
7
Views
2K
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
48
Views
5K
  • · Replies 9 ·
Replies
9
Views
3K