LoginSignup
0
0

More than 5 years have passed since last update.

Spreadsheetsでも愛が生まれた

Last updated at Posted at 2016-05-10

元ネタ
http://qiita.com/dongri/items/041ff3e7dde6c99beeb0

ブログにも投稿しています
http://ryoichi0102.hatenablog.com/entry/2016/05/11/003646

Spreadsheetsに書いてみた

Excelでもできると思います。
dec2hex(code(A1))でUnicodeに変換して各文字をmidで1桁にバラします。
その後、hex2bin(E1,4)でビットに変換します。
(4は4桁で出力の意)

その後、ビット演算なのですが、これがツラかった。

=if(and(mid(J1,1,1)="1",mid(J2,1,1)="1"),"1","0")&
if(and(mid(J1,2,1)="1",mid(J2,2,1)="1"),"1","0")&
if(and(mid(J1,3,1)="1",mid(J2,3,1)="1"),"1","0")&
if(and(mid(J1,4,1)="1",mid(J2,4,1)="1"),"1","0")

このあたり。
もっと良いやり方があれば知りたい。

ここで折り返し地点を超えて、
bin2hex、各桁を連結して、char(hex2dec( ))
と戻してあげれば完成です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0