Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 04-08-2006, 02:24 AM   #11 (permalink)
Chankama's Avatar
 
Monster Techie

Join Date: Jan 2005

Location: Canada

Posts: 1,522

Chankama will become famous soon enough

Default

Machines read 0's and 1's. But it's difficult for humans to remember which combinations of 0's and 1's "do stuff" in a particular CPU. So we write stuff in assembly. Which makes it easier to write instructions. "move", "branch", "return", "add", etc. etc. (well, abreviated versions of these commands). These will be converted to 0's and 1's that the CPU can understand.

C/C++ abstracts these another level and it also generates programs that can be understood by the CPU.

So,

assembly -> binary code (0,1)
C++ -> binary code (0,1)

There are things that you can do with assembly that is tough to do with C/C++. This is in the realms of operating system design and embedded systems. But overall, C/C++ is very powerful. Using assmebly to make everything is a difficult task. B/c it's difficult to keep track of what you are doing. In another 200 years, like in star trek, we will say "Computer, make an environment that has a huge waterfall". It's all about abstraction.

Operating system was also make using C/C++ and assembly, etc. and exists in machine code (0,1). The CPU will "run the OS" and the "OS" will "let" other programs run at the appropriate time getting out of the CPU and letting the program use it (in the simplistic sense).
Chankama is offline  
Old 04-09-2006, 10:54 PM   #12 (permalink)
 
Master Techie

Join Date: Apr 2004

Posts: 2,534

horndude is on a distinguished road

Default

C and C++ are just programming languages, the code that you write in C or C++ gets compiled and linked against libraries and that becomes and executable program or "binary"

binary in this context of this question by the original poster just means an executable program

when you compile a C or C++ program you can instruct the compiler to output the program in assembler actually, but it would still need converted into a binary before the computer can execute it, C and C++ are compiled languages, they arent interpreted languages like python or basic for example
horndude is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On