Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - Português

Change language to:
English - Français - 日本語 - Русский

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

Ajuda do Scilab >> Funções Elementares > Integer representation > bin2dec

bin2dec

conversão de representação binária para inteira

Seqüência de Chamamento

y=bin2dec(str)

Parâmetros

str

um string ou vetor/matriz de strings contendo apenas caracteres '1' e '0'

y

um escalar ou um vetor/matriz de inteiros positivos

Descrição

Dado str um string binário, está função retorna y, o número decimal cuja representação binária é dada por str ( y e str possuem o mesmo tamanho)

Exemplos

// example 1 :
// '1010110' : é a representação binária de 86 
str='1010110';
y=bin2dec(str)

// example 2 :
// '1011011' : é a representação binária de 91 
// '1010010' : é a representação binária de 82
str=['1011011'; '1010010']
y=bin2dec(str)

Ver Também

  • base2dec — conversão da base b para inteiros
  • oct2dec — conversão de octais para inteiros
  • hex2dec — conversão de representação hexadecimal para inteiros
  • dec2bin — representação binária
  • dec2oct — representação octal de inteiros
  • dec2hex — representação hexadecimal de inteiros
Report an issue
<< base2dec Integer representation dec2bin >>

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:
Thu Oct 02 13:57:39 CEST 2014