From: Kyongho Min
Subject: Two-byte char to bit array
Date: 
Message-ID: <bd09e78f.0203041420.633fa700@posting.google.com>
Hi there,

Can anyone help me change two-byte char into a bit array.
Otherwise how can I change a char #\A into a bit array.
I'd like to do some bit operation such as "shift 3 bits left".

Thanks in advance,

Kyongho Min

From: Nils Goesche
Subject: Re: Two-byte char to bit array
Date: 
Message-ID: <a60sh0$an61p$1@ID-125440.news.dfncis.de>
In article <····························@posting.google.com>, Kyongho Min wrote:
> Hi there,
> 
> Can anyone help me change two-byte char into a bit array.
> Otherwise how can I change a char #\A into a bit array.
> I'd like to do some bit operation such as "shift 3 bits left".

How about doing something like

(ash (char-code #\A) 3)

instead?

Regards,
-- 
Nils Goesche
"Don't ask for whom the <CTRL-G> tolls."

PGP key ID 0x42B32FC9
From: Erik Naggum
Subject: Re: Two-byte char to bit array
Date: 
Message-ID: <3224269905160580@naggum.net>
* ···········@aut.ac.nz (Kyongho Min)
| Can anyone help me change two-byte char into a bit array.
| Otherwise how can I change a char #\A into a bit array.
| I'd like to do some bit operation such as "shift 3 bits left".

  Can you do that on a bit array?  I have always missed the ability to do
  such useful things on bit arrays.

  You could probably work with the code-value of the character.
  char-code produces an integer that should be amenable to bit-shifting.

///
-- 
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.