Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Elementary Functions > Integer representation > bin2dec

bin2dec

2進表現を整数に変換します

呼び出し手順

y=bin2dec(str)

パラメータ

str

文字 '1' および '0'のみを含む文字列または 文字列のベクトル/行列

y

正の整数のスカラーまたはベクトル/行列

説明

2進文字列str を指定すると, この関数は, その2進表現がstrとなるような 10進数 y を返します. ( ystr の大きさは同じになります).

// example 1 :
// '1010110' : is the binary representation of 86 
str='1010110';
y=bin2dec(str)

// example 2 :
// '1011011' : is the binary representation of 91 
// '1010010' : is the binary representation of 82
str=['1011011'; '1010010']
y=bin2dec(str)

参照

  • base2dec — bを基底とする表現から整数への変換
  • oct2dec — 8進数を整数に変換する
  • hex2dec — 16進数表現から整数への変換
  • dec2bin — 2進表現
  • dec2oct — 整数の8進表現
  • dec2hex — 整数の16進表現
Report an issue
<< base2dec Integer representation dec2base >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:18:54 CEST 2014