ACCESSING PORTS

hi guys,
am a beginner in arduino, my doubts will definitely be stupid but kindly help me

can i send a hexa decimal value or decimal to a port and view it through led?
the sample codes shows i have to configure each pin n send either high or low bit, i want to access the whole port throgh some commands like portB=H5f of watever, is it possible in an arduino uno?

This wouldn't work:

portB=H5f

This would:
PORTB=0x5F

You can dec/increment the value in the port register too:

PORTB++;
PORTB += 10;
PORTB--;

And toggle all bits at once:

PORTB ^= 0xFF;

And pretty much anything you can do with a byte type variable (not quite but most things).

Another entrant: http://www.ioccc.org/

Or to define a set of macros:

#define setbits(var, bits) var |= (bits)
#define clrbits(var, bits) var &=~(bits)
#define flpbits(var, bits) var ^= (bits)

with that, you can operate on the port (or ddr or any other register for that matter)

setbits(PORTB, (1<<2)); //sets bit2 on portb
clrbits(DDRB, (1<<0)); //bit0 on portb set as input
flpbits(PORTB, (1<<2) | (1<<3)); //flip bit2 and bit3 on portb