Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Im so slow....

Status
Not open for further replies.

AtomSoft

Well-Known Member
What is the world does this mean ?

2**wordPower

I know wordPower is 5 so what would be the answer and how ?

This is from HDL code... thanks in advance
 
I don't know HDL, but in many programming languages (e.g., FORTRAN, Python) a**b means to raise a to the power b, usually with floating point arithmetic.
 
Hi,

Geeze, i havent seen that notation for years now. That was one of the first symbols for 'raise to the power of' that was ever used. Today we use the carat symbol like:
2^32
 
Remember "FORTRAN"? I can't remember if Keypunch machines had the ^ symbol. I did use one. Yuk. That may be the reason for the double stars.
 
Note there is no standard, so you have to know what's going on in the environment you're working in. For example, in C, the pow() function in the standard library is used, as there is no operator built into the language for exponentiation (and ^ in C always has meant integer XOR). In FORTRAN, the ** meant exponentiation; it also does so in some modern languages like python. I'm with Mr Al in that I prefer to use the carat for exponentiation -- but I get myself into syntax trouble in some programming languages when I forget... ;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top