1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
arlik [135]
3 years ago
5

Write a python function c that converts bitstring array back to an integer numpy array

Computers and Technology
1 answer:
tresset_1 [31]3 years ago
6 0

Answer:

import numpy as np#importing numpy module with an alias np.

def c(bitstring_array):# defining function c.

   num_integer=bitstring_array.dot(2**np.arange(bitstring_array.size)[::-1])#bitstring conversion.

   return num_integer#returning integer array.

print("Enter bits")

Bit_l=input().split(" ")#enter space separated bitstring.

for i in range(len(Bit_l)):#iterating over the bitstring.

   Bit_l[i]=int(Bit_l[i])

bitstring_array=np.array(Bit_l)

print(c(bitstring_array))#function call.

Output:

Enter bits

1 1 1 0 0 1

57

You might be interested in
What frequency band is used by bluetooth, 802.11b, and 802.11g?
bagirrra123 [75]
802.11 is a Wi-Fi standard, not a frequency, both of those operate at 2.4 GHz. Bluetooth operates at frequencies between 2402 and 2480 MHz, or 2400 and 2483.5 MHz. 
4 0
3 years ago
Which is a solution that represents the majority of VPNs on the market and is commonly referred to as a VPN appliance?
Dafna1 [17]

Answer:

Remote access VPN

Explanation:

The solution that represents the majority of VPN's on the markets and is commonly referred to as a VPN appliance is the Remote access VPN

A remote access VPN is a type of VPN  that  works by creating a virtual channel (appliance ) between different devices for the purpose of exchanging data in an encrypted form. although this Tunnel passes through the public internet the Data exchanged are only accessible by the devices connected via the tunnel only .

The remote access VPN  is mostly used to connect an employee to the company's network therefore it represent the majority of VPNs in the market.

3 0
3 years ago
Which statement is true about customizing presentation programs?
pashok25 [27]
A presentation program<span> is a </span>software<span> package used to display information in the form of a </span>slide show. It has three major functions: an editor that allows text to be inserted and formatted, a method for inserting and manipulating graphic images, and a slide-show system to display the
6 0
3 years ago
Is the following statement valid or invalid? Give reason if it is invalid. int 2a = 6:​
zubka84 [21]

Answer:when the principle die the irrevocable power of attorney is valid or invalid

Explanation:

4 0
1 year ago
In the 2018-2019 softball season, Allison hit the ball 28 out of 67 times, this included fouls. What was her percentage
ruslelena [56]

Answer:

Allison missed 58.21% of the times.

Explanation:

The first step is to divide 28 by 67 to get the answer in decimal form:

28 / 67 = 0.4179

Then, we multiplied the answer from the first step by one hundred to get the answer as a percentage:

0.4179 * 100 = 41.79%

Then 100(%) - 41.79(%) = 58.21%

5 0
2 years ago
Other questions:
  • Which computer device works like the human central nervous system by connecting all the computer’s parts together and allowing t
    9·1 answer
  • 3.
    13·1 answer
  • The Internet acts as a(n) blank services such as The World Wide Web and email
    6·2 answers
  • Publishing is copying Web pages and associated files to a Web<br> server. T or f
    12·1 answer
  • The conversion of decimal 0.0625 into its binary equivalent. Explain.
    7·1 answer
  • How to cancel branly subscription??​
    8·1 answer
  • In this lesson you wrote code to make the turtle draw squares. Briefly describe how the code for
    11·1 answer
  • PLEASE HELP ASAP!!!!!!!!!!!
    7·2 answers
  • Is it possible build a real time machine?
    7·2 answers
  • If you need to multiply 50 and 8 and divide by 2, what would you type on the numerlc keypad?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!