decimal to binary

hi guys

i am new to arduino so pls help how can we convert decimal to binary and output it serially through a pin???????????

By 'decimal' do you mean a number like 23 or a string of digits like "23"?

an integer like 23

Decimal and binary are simply visual representations of the data; the Arduino doesn’t know the difference unless it is trying to store as the visual representation (ASCII). If you want to say, display the binary number 23 on 8 digital pins, then you would simply need to use bitRead() to extract the individual bits and set the pins accordingly.

I feel like you’ve asked this before and we already answered it.

how can we convert decimal to binary and output it serially through a pin???????????

this way - http://arduino.cc/en/Tutorial/ShiftOut -

(and yes there are dozens of other ways)

how can we convert decimal to binary and output it serially through a pin???

(Is there something wrong with your "?" key?)

Serial.print (23, BIN); would seem to me to fit the specification.