C/C++ C++ programming and electrical engineering

AI Thread Summary
C++ programming has applications in electrical engineering, particularly in designing algorithms for tasks such as PCB routing and FPGA logic block management. Some engineers prefer C++ for its efficiency in implementing algorithms with data structures, as opposed to using C, which may introduce unnecessary overhead. While programming is not a requirement for all electrical engineers, it can enhance projects, especially in areas like microcontrollers and digital logic design. For example, using a microcontroller can simplify tasks like creating LED effects compared to traditional circuit methods. The flexibility of software allows for easier corrections compared to hardware modifications. Additionally, not all electrical engineers engage in electronics design; many may work in diverse fields such as power distribution, testing, technical writing, or even unrelated careers.
land_of_ice
Messages
136
Reaction score
0
Is C++ programming used in electrical engineering work, it really doesn't seem as though it would be,but what could it be useful for, some kind of possible scenario ? (E.E. encorporates the use of electricity to make things happen mainly, whereas C++ has to do with computer design)
 
Technology news on Phys.org
Well you can use C++ to design algorithms. For example, implementing a routing algorithm for PCB routing, or routing of logic blocks or logic clusters on an FPGA. Some engineers would prefer the use of C++ to design such algorithms, because they find it easier to implement the algorithm using data structures in a particular language. Sometimes using only C may leave you with a lot of overhead. But it really depends on the application.
 
basic is used a lot with pics - unless you plan to go professional this would be the way to go.
 
One does not need to use programming whatsoever as an electronics engineer. However, you'll probably end up doing lots and lots of analog electronics or lots and lots of discrete logic.

I have a friend who wanted to make an LED flash when a button was pushed. He was going to use a 555 timer circuit along with a transistor (around a half-dozen parts, utilizing some resistors he didn't have on hand and probably an hour or two of tinkering). I suggested that he use a small microcontroller instead, and a half-dozen or so lines of c code. Or a few more lines to make really cool lighting effects (this was for a Deathstar cake his fiancée had been commissioned to make). Ironically, I'm the EE, and he's the CompSci.

In a nutshell, programming (and microcontrollers, CPLDs, FPGAs, etc.) allow you to trade hardware for software. And if you mess up, it's often much easier to fix software mistakes (by reprogramming, or uploading new software to reprogrammable devices) than hardware mistakes (track cutting, ugly board hacks, etc.)

And of course, not all EEs (nor even a significant portion of them) end up doing electronics design (e.g. power distribution systems), design at all (e.g. testing or technical writing), or even something that nebulously falls under the aegis of engineering! (E.g. management or sales, and that doesn't count the people that decide to ditch their EE degrees and go to law school or become a priest, or a banker--things that some of my classmates actually ended up doing!)
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top