Questions tagged [megabyte]

A megabyte is a unit of size of computer memory or storage.

A megabyte is a unit of size of computer memory or storage.

It is defined as 1,048,576 bytes, or 1024 kilobytes (each of which are 1024 bytes).

23 questions
133
votes
24 answers

Does .NET provide an easy way convert bytes to KB, MB, GB, etc.?

Just wondering if .NET provides a clean way to do this: int64 x = 1000000; string y = null; if (x / 1024 == 0) { y = x + " bytes"; } else if (x / (1024 * 1024) == 0) { y = string.Format("{0:n1} KB", x / 1024f); } etc...
John Smith
  • 3,800
  • 5
  • 35
  • 55
21
votes
7 answers

How to correctly convert filesize in bytes into mega or gigabytes?

I'm using the DriveInfo class in my C# project to retrieve the available bytes on given drives. How to I correctly convert this number into Mega- or Gigabytes? Dividing by 1024 will not do the job I guess. The results always differ from those shown…
Mats
  • 13,840
  • 29
  • 73
  • 106
20
votes
8 answers

1 Mbit = ? bytes

I always get confused about this. Is there a "standard" conversion of Megabits to bytes? Is it: 1 Megabit == 1,000,000 bits == 125,000 bytes Or: 1 Megabit == 2^20 bits == 1,048,576 bits == 131,072 bytes
Nate
  • 16,729
  • 25
  • 68
  • 93
14
votes
5 answers

MySQL Convert Bytes to Kilobytes, Megabytes, Gigabytes

I have a logs table that stores various file sizes in bytes. I want to be able to query the database and return the smallest possible float which has been converted to MB GB etc. At present I can return the value in MB but how do I continue to…
user2985091
  • 141
  • 1
  • 1
  • 6
2
votes
1 answer

Converting from bytes to GB or MB returns nothing

I got this code, which returns number of bytes: $size = Get-ChildItem $userAccount.homeDirectory -Recurse | Measure-Object -Property Length -Sum This works fine, but is not very user friendly, so I want to convert to megabytes or gigabytes. After…
Erik M.
  • 61
  • 7
2
votes
2 answers

Is possible to set hadoop blocksize 24 MB?

I just want to ask your opinion about HDFS block size. So I set HDFS block size to 24 MB and it's can run normally. I remember that 24 MB is not an exponential number (multiplication of 2) for the usual size on computer. So I want to ask all of you,…
1
vote
3 answers

Converting from bandwidth to traffic gives different results depending on operators position?

This must be a stupid question, but nevertheless I find it curious: Say I have a steady download of 128Kbps. How much disk space is going to be consumed after a hour in Megabytes? 128 x 60 x 60 / 8 / 1024 = 56.25 MB But 128 x 60 x 60 / 1000 /8 =…
SyRenity
  • 831
  • 5
  • 11
  • 18
1
vote
1 answer

Is it normal that a simple counter react app is more tham 100MB?

I am a newbie with React.js and just for practice i made a simple counter web app. But i noticed that the project is more than 120MB. Is it possible? do i need to do something to shrink it?
Rayden C
  • 129
  • 1
  • 4
1
vote
3 answers

Confusion calculating size between Bytes and Megabytes

This is a solved problem where the we have to find a missing integer from the input data which is in form of a file containing 4 billion unsorted unsigned integers. The catch is that only 10 MBytes of memory can be used. The author gives a solution…
rgamber
  • 5,231
  • 8
  • 48
  • 92
1
vote
0 answers

What is the size of MINI_KIND in megabytes in android

What is the size of MediaStore.Images.Thumbnails.MINI_KIND in megabytes in android? The dimension of the bitmap is said to be MINI_KIND: 512 x 384. In case you need to know: My use case is the thumbnail of a video using ThumbnailUtils.
learner
  • 11,452
  • 24
  • 87
  • 160
1
vote
1 answer

ioStat and Awk Output and Format with Megabyte and end of each field

Would it be possible to add a "Mb" to the end of just MB_r/s and MB_wn/s. Awk is getting 3 fields and reporting them during the test line to line like below: example: Format output below: ^ ^ …
Queasy
  • 131
  • 11
1
vote
2 answers

How do I convert the database size from mega bytes to bytes or vice-versa?

Basically I'm creating a replication application and I just need to figure out the database size and how much free space I have available on the D:\ drive. If the database size is larger than the free space, then I need to alert the user. This is…
RJ.
  • 8,356
  • 29
  • 99
  • 176
1
vote
1 answer

How to reduce page size with devexpress controls

I'm currently having an optimization problem with a page. This is a dashboard-like page, it contains and AspxNavBar (analogue of Accordion control) with 3 groups, groups contain 2 charts inside callback panel, 4 grids inside callback panel (1 main +…
Artur Udod
  • 3,968
  • 23
  • 53
0
votes
1 answer

suppose there is a computer with 18 bits address space and the cell size is 8 bits, then what is the smallest and highest address?

suppose there is a computer with 18 bits address space and the cell size is 8 bits, then What is the smallest and highest address? What will be the possible largest memory size of this computer in bytes, kilobytes and megabytes?
0
votes
0 answers

Check that the following minimum packet sizes are sufficient for an Ethernet?

I am having difficulty working these questions out. I have tried googling on many websites but couldn't find any formulas for this. 64 bytes at 10 Mbps over 2.5 Km.
1
2