Hello everyone,

The questions is below. Please bear with me.

I'm a first year student, majoring in computer science. I have just finished an introductory course in the java programming language.

I already know that what i type to program in java is a source code that has to be compiled to java bytecode or class file in order for the virtual machine to translate that code into a language that the computer understands, which is only zero's and one's.

How could a JFrame, an image file, a video file or a text file etc... be represented by only a bunch of 000000's and 1111111's? how could the computer display these data?

Does the answer to this question relates more to computer science or computer engineering?

Is it good or bad to think this way for a first year student?

Sorry because my post is very tall. and thanks for bearing with me.

Best regards,

As you know the computer only does math, the compiled programs just tell the computer what functions to use based off the numbers, the CPU decodes all of the instructions coming in to it and does what is asked. Most of the time though you won't be dealing with binary but rather compiled code that runs using the help of the Kernel.

Video/text/image files are quite different, they are stored in an encoding so one of your programs can understand it, rather than the CPU or Kernel.

The question definitely relates to computer science, because most of the time all of this is managed by the Kernel, which is still software.

Its great thinking this way as a first year student, many people don't wonder at all and end up missing everything around them.

commented: Great, Thanks for replying +1

>How could a JFrame, an image file, a video file or a text file etc...
>be represented by only a bunch of 000000's and 1111111's?

0 and 1 are really just a convenient notation for the electrical pulses a binary computer uses to generate streams of data. Those pulses are interpreted by a chain of consumers which convert the bit stream back and forth between different representations.

How can something as complex as an image be represented by a stream of 0's and 1's? By combining them into an equally complex language suitable for consumption by a display driver which then determines which pixels on a monitor to light up. When you really think about the complexity of the whole system, it's a wonder that computers work at all.

>Is it good or bad to think this way for a first year student?
It's good to understand such low level things, but probably not until a solid base in more practical matters is built. Keep it on the back burner, but don't stress too much about pretending that some things work by "magic" until you're in a better position to learn how they really work.

commented: Great post, Thanks +1


I had some sort of questions like that too when i was at your station. The bad news was, those lecturers who suppose to guide me at that time, was lacking of this knowledge. So what they did was 'reading introduction from some books' and teaching it by 'term' and 'abstractions'.

Listen, computer science is about concepts + implementations. Concepts sets the direction, implementation proofs it. (Students who don't want to dirty your hands in programming, better don't sweat it in this areana!!! Studies in Business IT may help you)

The business is driving software engineers to focus more on frameworks (.NET, JDK etc) and to solve problems faster. They are merely using APIs and SDKs (software libraries) to solve the problem. But no one talks about Computer Architectures, Discrete Maths or even Compiler Architecture. You should get some traditional books on these two subjects and dig in deeper if you are interested. Try using C/C++ and a little knowledge in assembly will help you to understand that this is Computer Science were are talking about here.

Thank you guys for replying to me. I will concentrate on my studies for now and see what will happen.